`apt-get update`는 우분투 서버를 찾을 수 없습니다


50

sudo apt-get update인터넷에 연결된 서버에서 실행 이 실패합니다. 서버가 일시적으로 고장 났거나 APT가 잘못 구성되어 기존 서버를 사용하고 있습니까? 요컨대, 이것을 어떻게 고치나요?

출력은 다음과 같습니다.

~$ uname -a
Linux nematode 2.6.28-19-server #66-Ubuntu SMP Sat Oct 16 18:41:24 UTC 2010 i686 GNU/Linux

~$ sudo apt-get update
Err http://us.archive.ubuntu.com jaunty Release.gpg
  Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com jaunty/main Translation-en_US
  Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com jaunty/restricted Translation-en_US
  Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com jaunty/universe Translation-en_US
  Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com jaunty/multiverse Translation-en_US
  Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com jaunty-updates Release.gpg
  Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com jaunty-updates/main Translation-en_US
  Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com jaunty-updates/restricted Translation-en_US
  Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com jaunty-updates/universe Translation-en_US
  Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com jaunty-updates/multiverse Translation-en_US
  Could not resolve 'us.archive.ubuntu.com'
Err http://security.ubuntu.com jaunty-security Release.gpg
  Could not resolve 'security.ubuntu.com'
Err http://security.ubuntu.com jaunty-security/main Translation-en_US
  Could not resolve 'security.ubuntu.com'
Err http://security.ubuntu.com jaunty-security/restricted Translation-en_US
  Could not resolve 'security.ubuntu.com'
Err http://security.ubuntu.com jaunty-security/universe Translation-en_US
  Could not resolve 'security.ubuntu.com'
Err http://security.ubuntu.com jaunty-security/multiverse Translation-en_US
  Could not resolve 'security.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/jaunty/Release.gpg  Could not resolve 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/jaunty/main/i18n/Translation-en_US.bz2  Could not resolve 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/jaunty/restricted/i18n/Translation-en_US.bz2  Could not resolve 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/jaunty/universe/i18n/Translation-en_US.bz2  Could not resolve 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/jaunty/multiverse/i18n/Translation-en_US.bz2  Could not resolve 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/jaunty-updates/Release.gpg  Could not resolve 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/jaunty-updates/main/i18n/Translation-en_US.bz2  Could not resolve 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/jaunty-updates/restricted/i18n/Translation-en_US.bz2  Could not resolve 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/jaunty-updates/universe/i18n/Translation-en_US.bz2  Could not resolve 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/jaunty-updates/multiverse/i18n/Translation-en_US.bz2  Could not resolve 'us.archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/jaunty-security/Release.gpg  Could not resolve 'security.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/jaunty-security/main/i18n/Translation-en_US.bz2  Could not resolve 'security.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/jaunty-security/restricted/i18n/Translation-en_US.bz2  Could not resolve 'security.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/jaunty-security/universe/i18n/Translation-en_US.bz2  Could not resolve 'security.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/jaunty-security/multiverse/i18n/Translation-en_US.bz2  Could not resolve 'security.ubuntu.com'
W: Some index files failed to download, they have been ignored, or old ones used instead.
W: You may want to run apt-get update to correct these problems

1
출력은 cat /etc/resolv.conf무엇입니까?
ændrük

1
그것이 나를 위해 일 한대로 내 대답을 확인하십시오 : askubuntu.com/questions/135932/…
m.alaa8

답변:


22

명령 행에서 해당 호스트를 해결할 수 있습니까?

jinx:775 Z$ ping us.archive.ubuntu.com
PING us.archive.ubuntu.com (91.189.92.171) 56(84) bytes of data.
64 bytes from cassava.canonical.com (91.189.92.171): icmp_seq=1 ttl=128 time=104 ms

그렇지 않은 경우 다음 단계는 다음을 시도하는 것입니다 host -v.

jinx:776 Z$ host -v us.archive.ubuntu.com
Trying "us.archive.ubuntu.com"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14243
;; flags: qr rd ra; QUERY: 1, ANSWER: 8, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;us.archive.ubuntu.com.         IN      A

;; ANSWER SECTION:
us.archive.ubuntu.com.  592     IN      A       91.189.88.31
us.archive.ubuntu.com.  592     IN      A       91.189.88.40
us.archive.ubuntu.com.  592     IN      A       91.189.88.45
us.archive.ubuntu.com.  592     IN      A       91.189.88.46
us.archive.ubuntu.com.  592     IN      A       91.189.92.169
us.archive.ubuntu.com.  592     IN      A       91.189.92.170
us.archive.ubuntu.com.  592     IN      A       91.189.92.171
us.archive.ubuntu.com.  592     IN      A       91.189.88.30

Received 167 bytes from 10.211.55.1#53 in 37 ms
Trying "us.archive.ubuntu.com"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50130
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;us.archive.ubuntu.com.         IN      AAAA

;; AUTHORITY SECTION:
ubuntu.com.             1800    IN      SOA     ns1.canonical.com. hostmaster.canonical.com. 2011030301 10800 3600 604800 3600

Received 100 bytes from 10.211.55.1#53 in 65 ms
Trying "us.archive.ubuntu.com"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54875
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;us.archive.ubuntu.com.         IN      MX

;; AUTHORITY SECTION:
ubuntu.com.             1800    IN      SOA     ns1.canonical.com. hostmaster.canonical.com. 2011030301 10800 3600 604800 3600

Received 100 bytes from 10.211.55.1#53 in 62 ms

DNS 서버에서 반환 된 오류를 찾으십시오.


1
나는 그 ping중 어느 것도 해결하지 못했지만 IP를 통해 ping을 할 수 있다고 언급 했어야합니다 (별도의 컴퓨터에서 해결됨). 이 도움과 @ ændrük의 의견 덕분에 어떻게 든 내 DNS 항목이 완전히 쓸모가 없다는 것을 알았습니다. 그것들을 수정하면 문제가 해결되었습니다.
Phrogz

흥미로운 문제 : "호스트 : 명령을 찾을 수 없음"그러나 확인되지 않은 패키지를 수락하지 않고 apt를 사용하여 설치할 수 없습니다.
jhaagsma

수정할 실제 명령이 없습니다. 그것이 작동하고 있다고 말하면 올바르게 작동합니다. 내가 핑을 할 수없고 할 수 없다면 host -v나는 운명입니다. 무엇 향후 계획? 어떤 도움도 없습니다.
davejal

47

DNS 문제인 것 같습니다. 문제를 해결하려면 다음을 확인해야합니다.

/etc/resolv.conf

DNS 서버에 대한 좋은 항목이 있습니다.

Google 에는 사용할 수있는 공개 DNS 서버가 있습니다 .

예를 들어 /etc/resolv.conf위에서 설명한대로 파일 상단 (Google DNS 서버의 지점)에 다음 두 줄을 추가 할 수 있습니다 .

nameserver 8.8.8.8 
nameserver 8.8.4.4

물론이 파일을 변경하려면 루트 권한이 있어야하며 변경하기 전에 백업해야합니다!


2
자체 네트워크 내부의 주소를 확인해야하는 경우 반드시 좋은 계획은 아닙니다. 이름으로 모든 각 컴퓨터에 액세스해야하는 경우 방화벽 너머에 있으면됩니다.
Ceisc

@Ceisc-좋은 지적. 언급 해 주셔서 감사합니다!
브래드 파크

1
이 파일에는 "손으로이 파일을 편집하지 마십시오-변경 사항을 덮어 쓰게됩니다"라고 표시되어 있습니까?
jcollum

확실히 말할 수는 없지만 구글 퍼블릭 DNS 페이지
brad parks

1
이것은 최선의 답변입니다
bademba

15

이 스레드는 매우 오래되었다는 것을 알고 있지만 여전히 찾고있는 사람은 무선 액세스 포인트의 연결을 끊었다가 다시 연결하여이 문제를 해결했습니다.


1
이것은이 오류를 보는 많은 사람들에게 정답입니다 ... 당신은 단순히 온라인 상태가 아닙니다 ... WiFi를 연결하고 업데이트 명령을 다시 발행하십시오 ... sudo apt-get update && sudo apt-get dist-upgrade
Scott Stensland

감사! 이것은 나를 위해 일했다! 아마도 : 대부분의 사람들에게 해결책이 될 것 굉장 간단한 대답
로버트 로스

9

종종이 문제를 해결하기 위해 /etc/resolv.conf에 8.8.8.8을 입력했습니다. 월등 한 저렴한 클라우드 공급자 (이 경우 linode)를 처리 할 때 Esp.

고양이 /etc/resolv.conf

nameserver 8.8.8.8
nameserver 8.8.4.4
#nameserver 72.14.179.5
#nameserver 72.14.188.5

이들은 구글의 퍼블릭 DNS 서버입니다. 예, 아마도 해당 로그에서 도용을 추적 할 수 있습니다. 그러나 내가 그 서버에서 공격하는 경향이있는 유일한 사이트는 git and ubuntu archives입니다.


3

나는 동일한 문제를 Err on apt-get updateændrük가 올바르게 암시했다.

DNS 주소를 수동으로 파일 /etc/resolv.conf에서 운영자의 DNS 주소 로 변경하여 문제를 해결했습니다 .

이전에는 192.168.0.254Ubuntu 에서 설정했습니다 .


예, 수락 된 답변에 대한 후속 의견에서 언급했듯이 문제는 내 DNS가 호스로 연결되어 있고 좋은 값으로 설정되어야한다는 것입니다.
Phrogz

3

나는 비슷한 문제가있어서 sudo apt-get update 끝내지 못했습니다. 오류가있었습니다. 케이블 모뎀 을 다시 시작하려고 시도했지만 작동했습니다. 케이블 모뎀을 다시 시작할 수도 있습니다.


2

"http://us.archive.ubuntu.com"웹 페이지를 열 수 있는지 웹 브라우저에서 확인하십시오. 그렇다면 네트워크 프록시 설정에 문제가있는 것입니다.

Ubuntu Desktop에서 다음 단계를 수행하십시오.

  1. 시스템-> 환경 설정-> 네트워크 프록시로 이동하십시오.
  2. “수동 프록시 구성”을 선택하십시오
  3. “모든 프로토콜에 동일한 프록시 사용”확인
  4. HTTP 프록시 :, 포트 :
  5. 세부 정보를 누르고 "사용자 인증"을 확인하십시오.
  6. 사용자 이름과 비밀번호를 입력하고 닫습니다

이 작업을 수행 한 후 이러한 오류를 해결할 수있었습니다.


프록시를 사용하여이 문제를 해결했다고 말하고 있습니까?
zinking

2

방금이 같은 문제가있었습니다. 가상 머신에서 작업하고 있었고 끊임없이 IP 주소를 변경하는 것에 지쳤습니다. 고정 IP 주소를 설정 한 후 DNS 이름 서버를 설정하지 않아 더 이상 업데이트를받을 수 없습니다. 또한 이름 서버를 / etc / network / interfaces 파일에 추가해야했습니다. 여기 에 대한 정보가 있습니다 . (DNS 네임 서버는 어떻게 설정합니까)

다음 문제는 ifdown 및 ifup을 통해 네트워크 인터페이스를 재설정 할 수 없다는 것입니다. 이 코드는 저에게 효과적이었습니다.

sudo ifdown eth0 && sudo ifup --exclude=lo -a

이 문제에 대한 자세한 내용은 여기를 참조하십시오 . (네트워크 인터페이스를 재설정하는 방법)


2

편집 할 수 있습니다 /etc/resolvconf/resolv.conf.d/base(기본적으로 비어 있음).

nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver YOUR DNS SERVER

1

매우 간단합니다 :

  1. /etc/resolv.conf 파일에서 DNS 주소를 수동으로 찾으십시오.
  2. CD / etc / network /
  3. sudo nano 인터페이스
  4. 네임 서버 변경
  5. 네임 서버 8.8.8.8 8.8.4.4 동일한 라우터에서 작동하지 않습니다 (제 경우에는 hitron이 매우 나쁩니다.

회사 IP 라우팅이 전혀 작동하지 않음)

/etc/resolv.conf의 ip 주소를 사용해야합니다

내 경우에는 라우터 IP 만 사용하십시오 192.168.1.1


1

나는 또한이 문제를 해결했다. 시스템 설정-> 네트워크 프록시-> 자동 방법-> SYstem Weide 적용->으로 이동하여 관리자 비밀번호를 입력하십시오.


1

나는 이것이 오래된 게시물이라는 것을 알고 있지만 Dell E4310에 Ubuntu 16.10을 설치했는데 같은 문제가 발생했습니다. 이 게시물의 제안 사항을 따르려고했지만 아무것도 효과가 없으므로 업데이트 서버를 변경하기로 결정했습니다.

따라서 시스템 설정> 소프트웨어 및 업데이트에서 서버를 "기본"에서 다음으로 변경했습니다. http://mirror.cc.columbia.edu/pub/linux/ubuntu/archive

이제 내 업데이트가 문제없이 롤링됩니다. 도움이 되었기를 바랍니다.


1

DNS 문제를 피하려면 /etc/hosts예를 들어 서버의 IP에 추가해야 했습니다.

echo "91.189.91.24 security.ubuntu.com" >> /etc/hosts 
echo "91.189.91.24 archive.ubuntu.com" >> /etc/hosts
당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.