Cannot install packages. "Warning: untrusted versions..." plus "method driver /usr/lib/apt/methods/http could not be found"
- by Steve Tjoa
Judging from Internet forums, these errors appear to be popular when attempting to install packages:
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
I followed this post by uninstalling ubuntu-keyring. But I cannot reinstall ubuntu-keyring or ubuntu-minimal -- the above errors reappear.
In fact, I don't even seem to have apt (I must have caused this along the way by trying a bad solution, or maybe a clean):
steve:~$ sudo apt-get update
sudo: apt-get: command not found
Aptitude works, but I can't install 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
...or update
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.
I tried this post. Didn't help.
To summarize, the main problem is that I cannot install anything. While attempting to fix the problem, the other aforementioned errors occurred. Can you help me fix this error? Feel free to ask if you need more information.
Stats:
steve:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.10
Release: 11.10
Codename: oneiric