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! )

Nessun commento:

Posta un commento