The method driver /usr/lib/apt/methods/https could not be found.
apt-get ??https
正在使用Raspberry Pi照著網站安裝RPi-Monitor後要更新apt套件來源時,卻發生下面問題:
root@raspberrypi apt-get update E: The method driver /usr/lib/apt/methods/https could not be found.
查結果主要原因是我在加上RPi-Monitor的Source list中加入來源有https
開頭的網址:
root@raspberrypi /etc/apt/sources.list.d # cat /etc/apt/sources.list.d/rpimonitor.list # RPi-Monitor official repository deb https://github.com XavierBerger/RPi-Monitor-deb/raw/master/repo/ root@raspberrypi /etc/apt/sources.list.d #
但預設未安裝apt-transport-https
套件造成無法支援含有https
的來源,此時必需要先將https
開頭的來源位址改成http
或是先暫時移除來源:
rm /etc/apt/sources.list.d/rpimonitor.list
讓apt-get update
能順利更新列表,更新列表後再進行安裝apt-transport-https
:
root@raspberrypi /etc/apt/sources.list.d # apt-get install apt-transport-https Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: apt-transport-https 0 upgraded, 1 newly installed, 0 to remove and 142 not upgraded. Need to get 109 kB of archives. After this operation, 166 kB of additional disk space will be used. Get:1 http://archive.raspbian.org/raspbian/ wheezy/main apt-transport-https armhf 0.9.7.9+rpi1+deb7u7 [109 kB] Fetched 109 kB in 2s (54.0 kB/s) Selecting previously unselected package apt-transport-https. (Reading database ... 71792 files and directories currently installed.) Unpacking apt-transport-https (from .../apt-transport-https_0.9.7.9+rpi1+deb7u7_armhf.deb) ... Setting up apt-transport-https (0.9.7.9+rpi1+deb7u7) ... root@raspberrypi /etc/apt/sources.list.d #
此時你的apt-get就能支援https
功能。