Невозможно установить пакет из-за & ldquo; Что-то нечестивое произошло с разрешением & rdquo; ошибка

Я следую этим инструкциям, чтобы установить git на свой ноутбук. Когда я это сделаю:

$ sudo apt-get install git-core

Это то, что показывает мой terinal:

Reading package lists... Done
Building dependency tree        
Reading state information... Done
The following packages were automatically installed and are no longer required:   
  libasprintf0c2:i386
  libcroco3:i386
  libgettextpo0:i386
  libgomp1:i386
  libunistring0:i386
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  git git-man liberror-perl
Suggested packages:
  git-daemon-run
  git-daemon-sysvinit
  git-doc git-el
  git-arch git-cvs
  git-svn
  git-email
  git-gui
  gitk gitweb
The following NEW packages will be installed:
  git git-core git-man liberror-perl

 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
 Need to get 6,825 kB of archives. After this operation, 15.3 MB of additional disk space will be used. Do you want to continue [Y/n]? y
 WARNING: The following packages cannot be authenticated!
   liberror-perl git-man git git-core
Install these packages without verification [y/N]?
  E: Some packages could not be authenticated
lucas@lucas-Inspiron-N5050:~$ sudo apt-get install git-core
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libasprintf0c2:i386
  libcroco3:i386
  libgettextpo0:i386
  libgomp1:i386
  libunistring0:i386
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  git git-man liberror-perl
Suggested packages:
  git-daemon-run git-daemon-sysvinit
  git-doc git-el git-arch git-cvs git-svn
  git-email git-gui gitk gitweb
The following NEW packages will be installed:
  git git-core
  git-man liberror-perl
 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
 Need to get 6,825 kB of archives. After this operation, 15.3 MB of additional disk space will be used. Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
  liberror-perl git-man git git-core
Install these packages without verification [y/N]? y
Err httpq://py.archive.ubuntu.com/ubuntu/quantal/main liberror-perl all 0.17-1
   Something wicked happened resolving 'py.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err httpq://py.archive.ubuntu.com/ubuntu/ quantal/main git-man all 1:1.7.10.4-1ubuntu1
   Something wicked happened resolving 'py.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err httpq://py.archive.ubuntu.com/ubuntu/ quantal/main git amd64 1:1.7.10.4-1ubuntu1
   Something wicked happened resolving 'py.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Err httpq://py.archive.ubuntu.com/ubuntu/ quantal/main git-core all 1:1.7.10.4-1ubuntu1
   Something wicked happened resolving 'py.archive.ubuntu.com:http' (-5 - No address associated with hostname)
 Failed to fetch httpq://py.archive.ubuntu.com/ubuntu/pool/main/libe/liberror-perl/liberrorperl_0.17-1_all.deb
   Something wicked happened resolving 'py.archive.ubuntu.com:http' (-5 - No address associated with hostname)
 Failed to fetch httpq://py.archive.ubuntu.com/ubuntu/pool/main/g/gi/git-man_1.7.10.4-1ubuntu1_all.deb
   Something wicked happened resolving 'py.archive.ubuntu.com:http' (-5 - No address associated with hostname)
 Failed to fetch httpq://py.archive.ubuntu.com/ubuntu/pool/main/g/git/git_1.7.10.4-1ubuntu1_amd64.deb
   Something wicked happened resolving 'py.archive.ubuntu.com:http' (-5 - No address associated with hostname)
 Failed to fetch http://py.archive.ubuntu.com/ubuntu/pool/main/g/git/git-core_1.7.10.4-1ubuntu1_all.deb
  Something wicked happened resolving 'py.archive.ubuntu.com:http' (-5 - No address associated with hostname)
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Я устанавливаю git на Ubuntu 12.10? Я даже не могу сделать это из Ubuntu Software Center.

Спасибо заранее!

1
задан 26 July 2013 в 22:16

3 ответа

У вас есть статический IP-адрес, который вы установили в /etc/networks/interfaces? У меня была аналогичная проблема после обновления до Ubuntu 12.04. Проблема заключалась в том, что DNS-сервер больше не был установлен в /etc/resolv.conf, и независимо от того, что вы там положили, он перезаписывался при перезагрузке. Решение состоит в том, чтобы добавить в /etc/networks/interfaces следующее:

dns-nameservers `<IP address of the DNS server>`
dns-domain `<the name of the domain>`

Как быстро исправить это добавить сервер имен в resolv.conf, но он исчезнет после перезагрузки.

3
ответ дан 25 May 2018 в 04:58
  • 1
    Я не установил этот статический IP-адрес, который вы упоминаете @dinel! извините, я новичок, поэтому не могу отметить ваш ответ как полезный, потому что мне нужна 15 репутации – Lucas Windir 29 October 2012 в 06:06

В /etc/network/interfaces добавлено следующее:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.1.205
netmask 255.255.255.0
gateway 192.168.1.1

Когда я отлаживался, в /etc/resolv.conf сервера имен не было. Поэтому я добавил следующие строки:

nameserver 8.8.8.8
nameserver 192.168.1.1

Тогда сделал sudo apt-get update. Это просто сработало.

1
ответ дан 25 May 2018 в 04:58
  • 1
    «... эта проблема - это ... краткосрочная проблема с (или доступом) к вашему DNS-серверу. (Проблема на самом деле не связана с сервером в httpq://py.archive.ubuntu.com/, хотя, возможно, это связано с проблемой конфигурации для DNS-записи этого сервера.) & Quot; Цитата из этого ответа . – Gediminas Jeremiah Gudelis 26 July 2013 в 22:57

nano /ect/resolv.conf

Удалить все

Добавить этот

"nameserver 8.8.8.8"

сохранить и

Повторите попытку «apt-get update», это должно быть работа.

0
ответ дан 25 May 2018 в 04:58

Другие вопросы по тегам:

Похожие вопросы: