Не могу установить пакет из-за ошибки «Произошла какая-то нехорошая ошибка» [дубликат]

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

$ 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]?

  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.

Заранее спасибо!

13
задан 26 July 2013 в 21:16

4 ответа

У Вас есть статический 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
ответ дан 26 July 2013 в 21:16

В /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. Это просто сработало.

0
ответ дан 26 July 2013 в 21:16

Закройте все программы / окна, связанные с установкой программного обеспечения, например, Синаптик, софт-центр и терминалы.

Теперь вы должны удалить заблокированные файлы:

Вы можете удалить файл блокировки с помощью

sudo rm /var/lib/apt/lists/lock

, вам также может понадобиться удалить файл блокировки в каталоге кэша

sudo rm /var/cache/apt/archives/lock 

от: этот ответ

и теперь вы должны открыть терминал и запустить:

 sudo apt-get update --fix-missing

и теперь вы можете установите все, что вы хотите снова.
Хорошего дня

0
ответ дан 26 July 2013 в 21:16

nano /ect/resolv.conf

Удалить все

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

"nameserver 8.8.8.8"

сохранить и оставить.

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

0
ответ дан 26 July 2013 в 21:16

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

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