无法安装软件包。“警告:不受信任的版本...”以及“无法找到方法驱动程序 /usr/lib/apt/methods/http”

无法安装软件包。“警告:不受信任的版本...”以及“无法找到方法驱动程序 /usr/lib/apt/methods/http”

从互联网论坛来看,尝试安装软件包时,这些错误似乎很常见:

steve:~$ sudo aptitude install examplepackage 
The following NEW packages will be installed:
  examplepackage examplepackage-common{a} 
0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,834 kB of archives. After unpacking 7,631 kB will be used.
Do you want to continue? [Y/n/?] 
WARNING: untrusted versions of the following packages will be installed!

Untrusted packages could compromise your system's security.
You should only proceed with the installation if you are certain that
this is what you want to do.

  examplepackage examplepackage-common 

Do you want to ignore this warning and proceed anyway?
To continue, enter "Yes"; to abort, enter "No": Yes
E: The method driver /usr/lib/apt/methods/http could not be found.
E: The method driver /usr/lib/apt/methods/http could not be found.
E: Internal error: couldn't generate list of packages to download

我跟着这个帖子通过卸载ubuntu-keyring。但我无法重新安装ubuntu-keyringubuntu-minimal——上述错误再次出现。

事实上,我似乎甚至没有apt(我一定是在尝试一个糟糕的解决方案的过程中导致了这个问题,或者可能是clean):

steve:~$ sudo apt-get update
sudo: apt-get: command not found

Aptitude 可以工作,但我无法安装apt

steve:~$ sudo aptitude install apt
The following NEW packages will be installed:
  apt 
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,046 kB of archives. After unpacking 3,441 kB will be used.
E: The method driver /usr/lib/apt/methods/http could not be found.
E: The method driver /usr/lib/apt/methods/http could not be found.
E: Internal error: couldn't generate list of packages to download

...或更新

steve:~$ sudo aptitude update
E: The method driver /usr/lib/apt/methods/http could not be found.
E: The method driver /usr/lib/apt/methods/http could not be found.
E: The method driver /usr/lib/apt/methods/http could not be found.

我试过这个帖子.没帮助。


总而言之,主要问题是我无法安装任何东西。尝试修复该问题时,出现了上述其他错误。您能帮我修复这个错误吗?如果您需要更多信息,请随时询问。


统计数据:

steve:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 11.10
Release:    11.10
Codename:   oneiric

答案1

我决定手动apt安装http://packages.ubuntu.com。这解决了所有问题。它重新填充了/etc/apt/usr/lib/apt/methods

相关内容