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?

Rowan Lerowsky
  • 114
  • 2
  • 10

2 Answers2

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
techraf
  • 4,353
  • 10
  • 32
  • 43
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.