How do I fix a "E: The method driver /usr/lib/apt/methods/http could not be found." error?
Solution 1
SirCharlo said in the duplicate of this question:
sudo apt-get install apt-transport-https
I tried it and it worked for me.
Solution 2
in my case, find all the source in .list file, eg:
/etc/apt/sources.list
/etc/apt/sources.list.d/nginx.list
/etc/apt/sources.list.d/passenger.list
some source in the list are forced using https:// even if you changed it into http:// it will redirected to https://
the solutions is :
- backup and remove the https source first
- then run apt-get update
- run sudo apt-get install apt-transport-https
- restore the https source
Solution 3
Had the same problem on fresh OrangePi image. Swapping https to http didn't help. Finally I created a symlink to http with name https and was able to perform apt-get update. The first thing to install was apt-transport-https than I re-run the update.
Solution 4
My problem was the Opera browser in /etc/apt/sources.list.d/opera-stable.list was, it was wrote:
https//:
but the correct is:
https://
So I fix the line this way:
deb https://deb.opera.com/opera-stable/ stable non-free #Opera Browser (final releases)
and all solved!
Solution 5
My error read method driver /usr/lib/apt/methods/htttp
and after reading here and trying all offerings, I was about to give up when I noticed that the http
had one extra t
.
I went to did this:
sudo -H gedit /etc/apt/source.list
Ctrl + F to find all instances of htttp
.
removed the extra t
Saved (twice to make sure the bugger took it)
And viola, problem solved.
Guess that means I need to REALLY Read the error messages as I had been skimming over them. Lesson learned. that won't happen again
Abe
Updated on September 18, 2022Comments
-
Abe almost 2 years
I tried updating my packages from the terminal and this is what I got:
$ sudo apt-get 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. 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.
What does this mean? I'm using the United States mirror an I've tried using the main server for the mirror and I keep getting the same result is this because there are no updates?
-
Admin almost 12 yearsCan you show your
/etc/apt/sources.list
? -
Admin about 5 yearsSee the answer for this one, it solved the issue for me on Debian Stretch.
-
-
Abe almost 12 yearsEverything is in good form any other ideas?
-
Chris J.T. Auld over 11 yearsThis worked for me in Debian Squeeze.
-
Avinash Raj about 10 yearsHow is this possible? He can't able to connect to the internet.
-
muru about 8 yearsThat's called a captive portal.
-
Owen over 7 yearsSadly, this won't work if your apt cache is too far out of date. Now I'm stuck in a "hole in the bucket" problem :(
-
Bratchley over 7 years@Owen why not just disable the
https
repo until you can update your cache? -
mikemaccana almost 7 years@Owen that would allow someone else to provide a replacement or trojan wrapper around any unsigned package.
-
dlewin over 6 yearsThe OrangePI seems actually to still have this problem, could you precisely explain what do you mean by a "symlink" in this case please ?
-
Alex about 6 years@dlewin
cd /usr/lib/apt/methods
thenln -s http https
does the trick. -
David 天宇 Wong almost 6 yearsso you're saying you should update over an insecure connection?
-
shenk about 5 yearsthis was the only solution that worked for me on kali linux