Polecenie ,,apt-get update'' nie dzia

Konfiguracja serwerów, usług, itp.
Zico
Posty: 14
Rejestracja: 17 listopada 2011, 18:56

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

Post 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?
sethiel
Junior Member
Posty: 762
Rejestracja: 28 stycznia 2008, 11:50
Lokalizacja: Wrocław

Post autor: sethiel »

Czy idzie:

Kod: Zaznacz cały

ping ftp.pl.debian.org
Zico
Posty: 14
Rejestracja: 17 listopada 2011, 18:56

Post autor: Zico »

Nie.
Gdy dam np.:

Kod: Zaznacz cały

ping 8.8.8.8
to dochodzą pakiety.
Awatar użytkownika
LordRuthwen
Moderator
Posty: 2341
Rejestracja: 18 września 2009, 21:45
Lokalizacja: klikash?

Post autor: LordRuthwen »

No to zmień DNS i będzie działać.
sethiel
Junior Member
Posty: 762
Rejestracja: 28 stycznia 2008, 11:50
Lokalizacja: Wrocław

Post 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.
Zico
Posty: 14
Rejestracja: 17 listopada 2011, 18:56

Post 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?
Awatar użytkownika
Bastian
Member
Posty: 1424
Rejestracja: 30 marca 2008, 16:09
Lokalizacja: Poznañ

Post autor: Bastian »

Oczywiście, że może mieć znaczenie. Wszstko zależy jak masz ustawione tablice trasowania. Pokaż:

Kod: Zaznacz cały

ip route
Awatar użytkownika
Yampress
Administrator
Posty: 6420
Rejestracja: 09 sierpnia 2007, 21:41
Lokalizacja: PL

Post 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ć.
fnmirk
Senior Member
Posty: 8321
Rejestracja: 03 grudnia 2007, 06:37

Post autor: fnmirk »

Narysuj schemat blokowy sieci. Przedstaw wynik polecenia (jako root):

Kod: Zaznacz cały

ifconfig -a
ODPOWIEDZ