Strona 1 z 1

Polecenie ,,apt-get update'' nie działa

: 09 lutego 2012, 10:10
autor: Zico
Witam.
Mam problem z poleceniem:

Kod: Zaznacz cały

 apt-get update
Mianowicie taki, że nie działa. Pakiety nie są pobierane i nie wiem jak zrobić aby były. Napisałem gdyż szukam i sam nie mogę sobie z tym poradzić, a przejrzałem już wiele stron z podobnym problemem i nie znalazłem odpowiedzi.

Czy ktoś jest w stanie pomóc rozwiązać mi problem z tym poleceniem, aby zaczęło funkcjonować?
Pozdrawiam Zico.

Log błędu:

Kod: Zaznacz cały

Err http://ftp.pl.debian.org squeeze Release.gpg
  Could not resolve 'ftp.pl.debian.org'
Err http://ftp.pl.debian.org/debian/ squeeze/contrib Translation-en
  Could not resolve 'ftp.pl.debian.org'
Err http://ftp.pl.debian.org/debian/ squeeze/contrib Translation-en_US
  Could not resolve 'ftp.pl.debian.org'
Err http://ftp.pl.debian.org/debian/ squeeze/main Translation-en
  Could not resolve 'ftp.pl.debian.org'
Err http://ftp.pl.debian.org/debian/ squeeze/main Translation-en_US
  Could not resolve 'ftp.pl.debian.org'
Err http://ftp.pl.debian.org/debian/ squeeze/non-free Translation-en
  Could not resolve 'ftp.pl.debian.org'
Err http://ftp.pl.debian.org/debian/ squeeze/non-free Translation-en_US
  Could not resolve 'ftp.pl.debian.org'
Err http://ftp.pl.debian.org squeeze-updates Release.gpg
  Could not resolve 'ftp.pl.debian.org'
Err http://ftp.pl.debian.org/debian/ squeeze-updates/contribt Translation-en
  Could not resolve 'ftp.pl.debian.org'
Err http://ftp.pl.debian.org/debian/ squeeze-updates/contribt Translation-en_US
  Could not resolve 'ftp.pl.debian.org'
Err http://security.debian.org squeeze/updates Release.gpg
  Could not resolve 'security.debian.org'
Err http://security.debian.org/ squeeze/updates/contrib Translation-en
  Could not resolve 'security.debian.org'
Err http://security.debian.org/ squeeze/updates/contrib Translation-en_US
  Could not resolve 'security.debian.org'
Err http://security.debian.org/ squeeze/updates/main Translation-en
  Could not resolve 'security.debian.org'
Err http://security.debian.org/ squeeze/updates/main Translation-en_US
  Could not resolve 'security.debian.org'
Err http://security.debian.org/ squeeze/updates/non-free Translation-en
  Could not resolve 'security.debian.org'
Err http://security.debian.org/ squeeze/updates/non-free Translation-en_US
  Could not resolve 'security.debian.org'
Err http://ftp.pl.debian.org/debian/ squeeze-updates/main Translation-en
  Could not resolve 'ftp.pl.debian.org'
Err http://ftp.pl.debian.org/debian/ squeeze-updates/main Translation-en_US
  Could not resolve 'ftp.pl.debian.org'
Err http://ftp.pl.debian.org/debian/ squeeze-updates/non-free Translation-en
  Could not resolve 'ftp.pl.debian.org'
Err http://ftp.pl.debian.org/debian/ squeeze-updates/non-free Translation-en_US
  Could not resolve 'ftp.pl.debian.org'
Reading package lists... Done
W: Failed to fetch http://ftp.pl.debian.org/debian/dists/squeeze/Release.gpg  Could not resolve 'ftp.pl.debian.org'

W: Failed to fetch http://ftp.pl.debian.org/debian/dists/squeeze/contrib/i18n/Translation-en.gz  Could not resolve 'ftp.pl.debian.org'

W: Failed to fetch http://ftp.pl.debian.org/debian/dists/squeeze/contrib/i18n/Translation-en_US.gz  Could not resolve 'ftp.pl.debian.org'

W: Failed to fetch http://ftp.pl.debian.org/debian/dists/squeeze/main/i18n/Translation-en.gz  Could not resolve 'ftp.pl.debian.org'

W: Failed to fetch http://ftp.pl.debian.org/debian/dists/squeeze/main/i18n/Translation-en_US.gz  Could not resolve 'ftp.pl.debian.org'

W: Failed to fetch http://ftp.pl.debian.org/debian/dists/squeeze/non-free/i18n/Translation-en.gz  Could not resolve 'ftp.pl.debian.org'

W: Failed to fetch http://ftp.pl.debian.org/debian/dists/squeeze/non-free/i18n/Translation-en_US.gz  Could not resolve 'ftp.pl.debian.org'

W: Failed to fetch http://security.debian.org/dists/squeeze/updates/Release.gpg  Could not resolve 'security.debian.org'

W: Failed to fetch http://security.debian.org/dists/squeeze/updates/contrib/i18n/Translation-en.gz  Could not resolve 'security.debian.org'

W: Failed to fetch http://security.debian.org/dists/squeeze/updates/contrib/i18n/Translation-en_US.gz  Could not resolve 'security.debian.org'

W: Failed to fetch http://security.debian.org/dists/squeeze/updates/main/i18n/Translation-en.gz  Could not resolve 'security.debian.org'

W: Failed to fetch http://security.debian.org/dists/squeeze/updates/main/i18n/Translation-en_US.gz  Could not resolve 'security.debian.org'

W: Failed to fetch http://security.debian.org/dists/squeeze/updates/non-free/i18n/Translation-en.gz  Could not resolve 'security.debian.org'

W: Failed to fetch http://security.debian.org/dists/squeeze/updates/non-free/i18n/Translation-en_US.gz  Could not resolve 'security.debian.org'

W: Failed to fetch http://ftp.pl.debian.org/debian/dists/squeeze-updates/Release.gpg  Could not resolve 'ftp.pl.debian.org'

W: Failed to fetch http://ftp.pl.debian.org/debian/dists/squeeze-updates/contribt/i18n/Translation-en.gz  Could not resolve 'ftp.pl.debian.org'

W: Failed to fetch http://ftp.pl.debian.org/debian/dists/squeeze-updates/contribt/i18n/Translation-en_US.gz  Could not resolve 'ftp.pl.debian.org'

W: Failed to fetch http://ftp.pl.debian.org/debian/dists/squeeze-updates/main/i18n/Translation-en.gz  Could not resolve 'ftp.pl.debian.org'

W: Failed to fetch http://ftp.pl.debian.org/debian/dists/squeeze-updates/main/i18n/Translation-en_US.gz  Could not resolve 'ftp.pl.debian.org'

W: Failed to fetch http://ftp.pl.debian.org/debian/dists/squeeze-updates/non-free/i18n/Translation-en.gz  Could not resolve 'ftp.pl.debian.org'

W: Failed to fetch http://ftp.pl.debian.org/debian/dists/squeeze-updates/non-free/i18n/Translation-en_US.gz  Could not resolve 'ftp.pl.debian.org'

W: Some index files failed to download, they have been ignored, or old ones used instead.
Plik interfaces:

Kod: Zaznacz cały

auto lo
iface lo inet loopback                        
auto eth0
allow-hotplug eth0
 
iface eth0 inet static
address 10.11.0.31
netmask 255.255.255.0
network 10.11.0.0
broadcast 10.11.0.255
gateway 10.11.0.1
 
auto eth1
allow-hotplug eth1
iface eth1 inet static
address 192.168.2.200
netmask 255.255.252.0
broadcast 192.168.2.255
gateway 192.168.2.1
Plik /etc/resolf.conf

Kod: Zaznacz cały

domain Orange
search Orange
nameserver 192.168.2.1
Plik /etc/apt/source.list

Kod: Zaznacz cały

#deb http://ftp.us.debian.org/debian/ squeeze main
 
deb http://ftp.pl.debian.org/debian/ squeeze main non-free contrib
deb-src http://ftp.pl.debian.org/debian/ squeeze main non-free contrib
 
deb http://security.debian.org/ squeeze/updates main contrib non-free
deb-src http://security.debian.org/ squeeze/updates main contrib non-free
 
#squeeze-updates, previously known as 'volatile'
deb http://ftp.pl.debian.org/debian/ squeeze-updates main non-free contribt
deb-src http://ftp.pl.debian.org/debian/ squeeze-updates main non-free contrib

Edycja:
Dokonałem zmian w pliku /etc/resolv.conf:

Kod: Zaznacz cały

domain Orange
search Orange
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 192.168.2.1
Nic to nie dało?

: 09 lutego 2012, 13:34
autor: sethiel
Czy idzie:

Kod: Zaznacz cały

ping ftp.pl.debian.org

: 09 lutego 2012, 13:50
autor: Zico
Nie.
Gdy dam np.:

Kod: Zaznacz cały

ping 8.8.8.8
to dochodzą pakiety.

: 09 lutego 2012, 14:17
autor: LordRuthwen
No to zmień DNS i będzie działać.

: 09 lutego 2012, 14:24
autor: sethiel
Toteż właśnie, twój problem to nie "niedziałający apt-get" ale "niedziałający DNS/źle skonfigurowane DNS".
Poszukaj na forum, było sporo tematów odnośnie jak ustawić dns.

: 09 lutego 2012, 14:33
autor: Zico
Jeżeli chodzi o plik resolf.conf to dodałem nameserver 8.8.8.8 i 8.8.4.4.chyba że w etc/interfaces mam zmienić coś na sztywno?
Edycja
Zauważyłem że jak na sztywno wpisałem do etc/interfaces linijki dns nameserver 8.8.8.8 i dns nameserver 8.8.4.4 dla eth1 to straciłem zdalne połączenie z moim serwerem. Czy fakt że używam zdalnego połączenia OpenVPN ma wpływ na DNS'a na serwerze?

: 09 lutego 2012, 19:35
autor: Bastian
Oczywiście, że może mieć znaczenie. Wszstko zależy jak masz ustawione tablice trasowania. Pokaż:

Kod: Zaznacz cały

ip route

: 09 lutego 2012, 21:51
autor: Yampress
... /etc/resolv.conf:

Kod: Zaznacz cały

domain Orange
search Orange
...
A po co to? Usuń.


A to:

Kod: Zaznacz cały

...
netmask 255.255.252.0
...
na końcu chyba 255 powinno być.

: 09 lutego 2012, 23:06
autor: fnmirk
Narysuj schemat blokowy sieci. Przedstaw wynik polecenia (jako root):

Kod: Zaznacz cały

ifconfig -a