1/22/2010

Problemi con l'aggiornamento dei pacchetti

Mi è capitato d'incappare nel seguente problema recentemente:

Tentando di aggiornare la lista dei pacchetti per la mia distribuzione Intrepid:

$ sudo apt-get update

Ho ricevuto sul terminale la seguente sfilza di errori:

$ sudo apt-get update
[sudo] password for utente:
Err http://security.ubuntu.com intrepid-security Release.gpg
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://download.skype.com stable Release.gpg
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Ign http://security.ubuntu.com intrepid-security Release
Err http://it.archive.ubuntu.com intrepid Release.gpg
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://it.archive.ubuntu.com intrepid-updates Release.gpg
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Ign http://download.skype.com stable Release
Ign http://security.ubuntu.com intrepid-security/main Packages
Ign http://it.archive.ubuntu.com intrepid Release
Ign http://download.skype.com stable/non-free Packages
Ign http://security.ubuntu.com intrepid-security/restricted Packages
Ign http://security.ubuntu.com intrepid-security/main Sources
Ign http://security.ubuntu.com intrepid-security/restricted Sources
Ign http://it.archive.ubuntu.com intrepid-updates Release
Ign http://security.ubuntu.com intrepid-security/universe Packages
Ign http://security.ubuntu.com intrepid-security/universe Sources
Ign http://security.ubuntu.com intrepid-security/multiverse Packages
Ign http://security.ubuntu.com intrepid-security/multiverse Sources
Err http://download.skype.com stable/non-free Packages
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://security.ubuntu.com intrepid-security/main Packages
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://security.ubuntu.com intrepid-security/restricted Packages
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://security.ubuntu.com intrepid-security/main Sources
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://security.ubuntu.com intrepid-security/restricted Sources
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://security.ubuntu.com intrepid-security/universe Packages
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://security.ubuntu.com intrepid-security/universe Sources
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Ign http://it.archive.ubuntu.com intrepid/main Packages
Ign http://it.archive.ubuntu.com intrepid/restricted Packages
Ign http://it.archive.ubuntu.com intrepid/main Sources
Ign http://it.archive.ubuntu.com intrepid/restricted Sources
Ign http://it.archive.ubuntu.com intrepid/universe Packages
Ign http://it.archive.ubuntu.com intrepid/universe Sources
Ign http://it.archive.ubuntu.com intrepid/multiverse Packages
Ign http://it.archive.ubuntu.com intrepid/multiverse Sources
Err http://security.ubuntu.com intrepid-security/multiverse Packages
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://security.ubuntu.com intrepid-security/multiverse Sources
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Ign http://it.archive.ubuntu.com intrepid-updates/main Packages
Ign http://it.archive.ubuntu.com intrepid-updates/restricted Packages
Ign http://it.archive.ubuntu.com intrepid-updates/main Sources
Err http://archive.canonical.com intrepid Release.gpg
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Ign http://archive.canonical.com intrepid Release
Ign http://it.archive.ubuntu.com intrepid-updates/restricted Sources
Ign http://it.archive.ubuntu.com intrepid-updates/universe Packages
Ign http://it.archive.ubuntu.com intrepid-updates/universe Sources
Ign http://it.archive.ubuntu.com intrepid-updates/multiverse Packages
Ign http://it.archive.ubuntu.com intrepid-updates/multiverse Sources
Err http://it.archive.ubuntu.com intrepid/main Packages
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://it.archive.ubuntu.com intrepid/restricted Packages
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://it.archive.ubuntu.com intrepid/main Sources
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://it.archive.ubuntu.com intrepid/restricted Sources
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://it.archive.ubuntu.com intrepid/universe Packages
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://it.archive.ubuntu.com intrepid/universe Sources
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://it.archive.ubuntu.com intrepid/multiverse Packages
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://it.archive.ubuntu.com intrepid/multiverse Sources
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://it.archive.ubuntu.com intrepid-updates/main Packages
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://it.archive.ubuntu.com intrepid-updates/restricted Packages
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://it.archive.ubuntu.com intrepid-updates/main Sources
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://it.archive.ubuntu.com intrepid-updates/restricted Sources
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://it.archive.ubuntu.com intrepid-updates/universe Packages
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://it.archive.ubuntu.com intrepid-updates/universe Sources
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://it.archive.ubuntu.com intrepid-updates/multiverse Packages
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://it.archive.ubuntu.com intrepid-updates/multiverse Sources
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Ign http://archive.canonical.com intrepid/partner Packages
Ign http://archive.canonical.com intrepid/partner Sources
Err http://archive.canonical.com intrepid/partner Packages
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
Err http://archive.canonical.com intrepid/partner Sources
Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)
W: Failed to fetch http://it.archive.ubuntu.com/ubuntu/dists/intrepid/Release.gpg Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://it.archive.ubuntu.com/ubuntu/dists/intrepid-updates/Release.gpg Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://archive.canonical.com/ubuntu/dists/intrepid/Release.gpg Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/intrepid-security/Release.gpg Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://download.skype.com/linux/repos/debian/dists/stable/Release.gpg Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/intrepid-security/main/binary-i386/Packages.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://download.skype.com/linux/repos/debian/dists/stable/non-free/binary-i386/Packages.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/intrepid-security/restricted/binary-i386/Packages.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/intrepid-security/main/source/Sources.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/intrepid-security/restricted/source/Sources.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/intrepid-security/universe/binary-i386/Packages.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/intrepid-security/universe/source/Sources.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/intrepid-security/multiverse/binary-i386/Packages.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/intrepid-security/multiverse/source/Sources.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://it.archive.ubuntu.com/ubuntu/dists/intrepid/main/binary-i386/Packages.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://it.archive.ubuntu.com/ubuntu/dists/intrepid/restricted/binary-i386/Packages.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://it.archive.ubuntu.com/ubuntu/dists/intrepid/main/source/Sources.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://it.archive.ubuntu.com/ubuntu/dists/intrepid/restricted/source/Sources.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://it.archive.ubuntu.com/ubuntu/dists/intrepid/universe/binary-i386/Packages.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://it.archive.ubuntu.com/ubuntu/dists/intrepid/universe/source/Sources.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://it.archive.ubuntu.com/ubuntu/dists/intrepid/multiverse/binary-i386/Packages.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://it.archive.ubuntu.com/ubuntu/dists/intrepid/multiverse/source/Sources.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://it.archive.ubuntu.com/ubuntu/dists/intrepid-updates/main/binary-i386/Packages.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://it.archive.ubuntu.com/ubuntu/dists/intrepid-updates/restricted/binary-i386/Packages.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://it.archive.ubuntu.com/ubuntu/dists/intrepid-updates/main/source/Sources.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://it.archive.ubuntu.com/ubuntu/dists/intrepid-updates/restricted/source/Sources.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://it.archive.ubuntu.com/ubuntu/dists/intrepid-updates/universe/binary-i386/Packages.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://it.archive.ubuntu.com/ubuntu/dists/intrepid-updates/universe/source/Sources.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://it.archive.ubuntu.com/ubuntu/dists/intrepid-updates/multiverse/binary-i386/Packages.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://it.archive.ubuntu.com/ubuntu/dists/intrepid-updates/multiverse/source/Sources.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://archive.canonical.com/ubuntu/dists/intrepid/partner/binary-i386/Packages.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

W: Failed to fetch http://archive.canonical.com/ubuntu/dists/intrepid/partner/source/Sources.gz Cannot initiate the connection to 666:80 (0.0.2.154). - connect (22 Invalid argument)

E: Some index files failed to download, they have been ignored, or old ones used instead.
Exit 100


Il problema era dovuto al fatto che era stata settata una variabile d'ambiente di nome http_proxy, che non permetteva di effettuare ne lo scaricamento della lista aggiornata dei pacchetti disponibili sul repository, ne di scaricare i pacchetti stessi!


Come risolvere il problema:

Anzitutto verificare la presenza della variabile d'ambiente http_proxy col seguente comando:

$ echo $http_proxy

Potremmo ricevere due tipi di risposta:
  1. non viene stampato nulla a schermo
  2. viene stampato l'indirizzo del proxy (es. proxy.pinco.pallino.it:666)

Soluzioni proposte:


Eliminare la variabile d'ambiente http_proxy col seguente comando:

Sotto shell tcsh digitare setenv http_proxy
Sotto shell bash digitare export http_proxy=""

È necessario assicurarsi che nel proprio file di configurazione del terminale (.user-cshrc o .bash-rc) non sia presente la variabile d'ambiente http_proxy; per eliminarla basta ricercarla all'interno del file e poi commentarla con il carattere # posto ad inizio righa:

Sotto shell tcsh digitare #setenv http_proxy pinco.pallino.it:666 Sotto shell bash digitare #export http_proxy="pinco.pallino.it:666"


Note:

Non dovrebbero comunque esserci problemi di aggiornamento a priori, se si utilizza l'utente root; è però necessario diventare root o con su - o con su root; il solo comando su non basta ad esportare tutte le variabili d'ambiente necessario e qualcosa a volte potrebbe andare male ( Sul mio PC infatti capitava che il mio utente avesse la variabile d'ambiente http_proxy impostata, mentre l'utente root no, quindi in root gli aggiornamenti dei pacchetti funzionavano senza alcun problema mentre con l'utente normale che utilizza sudo no! )

1/20/2010

Creare una prolunga del telefono per il modem ADSL

Obiettivo:
Questo breve post mi aiutera' a ricordare come crimpare un "doppino telefonico" per crearmi una semplice prolunga da utilizzare per collegare il mio router/modem ADSL lontano dalla presa principale del telefono.

Basterebbero solo due cavi per realizzare la prolunga, ma visto che questa potrebbe tornare utile anche per altri scopi, meglio crimpare tutti e quattro i cavi.


Cosa serve:
  • Pinza crimpatrice (nella versione economica la si trova a 7€, ma non garantisco sulle performance; visto che non ne posseggo personalmente una e quella che ho utilizzato era di marca, con un valore di circa 50€)
  • Doppino telefonico a 4 fili
  • Plug RJ-11

Come procedere:
La questione è semplice; basta applicare i plug RJ 11 alla prolunga in modo tale che la sequenza dei colori risulti invertita:

PLUG1:
Nero Rosso Verde Giallo
PLUG2:
Giallo Verde Rosso Nero

Nel dettaglio ho visto che è necessario spelare i fili in modo tale che siano tutti bene o male della stessa misura e che il rivestimento esterno del cavo, se infilato all'interno del plug, vada a fare spessore sotto un "dentino" del plug, che nella fase di cripatura, dovrebbe andare a bloccare il cavo facendo leva sul dentino.


Altre informazioni utili:
  • È bene non esagerare con la lunghezza della prolunga; per adesso io ne ho realizzate un paio da una ventina di metri.
  • Applicare sempre un filtro ADSL su tutte le prese telefoniche che si utilizzano in casa, per evitare interferenze con l'apparecchio telefonico
  • [Da verificare] È bene collegare il doppino della prolunga al filtro posto sulla presa principale del proprio impianto telefonico (anche in questo caso non so il motivo preciso; se qualcuno vuole fornire informazioni più dettagliate è il benvenuto)

Pultroppo non posso fornirvi informazioni più dettagliate in merito alla questione, in quanto non sono un esperto di impianti di telecominicazione; Se qualche lettore del blog volesse lasciare un commento per inserire ulteriori informazioni utili, allora ben venga .

Risorse utili:

Ho trovato in rete questo breve post con ulteriori informazioni in metiro alla questione impianti telefonici. Clicca QUI!