4

Whenever I try the command sudo apt-get update it outputs this error:

E: The method driver /usr/lib/apt/methods/https could not be found.

N: Is the package apt-transport-https installed?

I couldn't find any answers online. Can someone please help?

2 Answers 2

5

Because somewhere on the way you must have configured an APT repository pointing to an HTTPS URL (check the files at /etc/apt/sources.list.d/).

Per the error message to fix the problem you need to run:

sudo apt-get install apt-transport-https

and most likely also:

sudo apt-get install ca-certificates
5
  • I've already tried the first of those two, and the "package not found" error occured. Commented Dec 10, 2016 at 1:57
  • Well, reading your question again and again, I can't see any mention you "have already tried". Until you ask a proper question, you won't get an answer that solves your problem. And it looks like you have messed your APT sources completely.
    – techraf
    Commented Dec 10, 2016 at 1:57
  • Well, I didn't ever delete or mess with any apt source files, so I don't see how this could have happened, unless I have a virus or something. Commented Dec 10, 2016 at 2:03
  • 2
    Start again with a fresh image. There's nothing else anyone without clairvoyant powers can advice you.
    – techraf
    Commented Dec 10, 2016 at 2:09
  • Thanks! I just tried it again from another window, and the install worked! Commented Dec 10, 2016 at 2:10
1

I have checked /etc/apt/sources.list.d/. In my case there I found two files. raspi.list and influxdb.list. I found https in influxdb.list file. I removed influxdb.list file with rm command. Now my Raspberrypi works perfectly. I am able to run sudo apt-get update without any errors.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.