解決:The method driver /usr/lib/apt/methods/https could not be found.
The method driver /usr/lib/apt/methods/https could not be found.
解決辦法--執行單獨安裝命令:apt-get install apt-transport-https
錯誤資訊:
[email protected]:/# apt-get update
Hit:1 http://mirrors.aliyun.com/ubuntu xenial InRelease
Get:2 http://mirrors.aliyun.com/ubuntu xenial-updates InRelease [109 kB]
Get:3 http://mirrors.aliyun.com/ubuntu xenial-backports InRelease [107 kB]
Get:4 http://mirrors.aliyun.com/ubuntu xenial-security InRelease [107 kB]
Get:5 http://mirrors.aliyun.com/ubuntu xenial-updates/main Sources [406 kB]
Get:6 http://mirrors.aliyun.com/ubuntu xenial-updates/restricted Sources [2684 B]
Get:7 http://archive.canonical.com/ubuntu xenial InRelease [11.5 kB]
Get:8 http://mirrors.aliyun.com/ubuntu xenial-updates/multiverse Sources [8995 B]
Hit:9 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:10 http://mirrors.aliyun.com/ubuntu xenial-updates/universe Sources [280 kB]
Get:11 http://mirrors.aliyun.com/ubuntu xenial-updates/main amd64 Packages [1112 kB]
Get:12 http://archive.canonical.com/ubuntu xenial/partner Sources [2408 B]
Get:13 http://mirrors.aliyun.com/ubuntu xenial-updates/restricted amd64 Packages [13.1 kB]
Get:14 http://mirrors.aliyun.com/ubuntu xenial-updates/universe amd64 Packages [889 kB]
Get:15 http://archive.canonical.com/ubuntu xenial/partner amd64 Packages [3248 B]
Get:16 http://mirrors.aliyun.com/ubuntu xenial-updates/multiverse amd64 Packages [18.8 kB]
Get:17 http://mirrors.aliyun.com/ubuntu xenial-backports/main Sources [5103 B]
Get:18 http://mirrors.aliyun.com/ubuntu xenial-backports/universe Sources [7237 B]
Get:19 http://mirrors.aliyun.com/ubuntu xenial-backports/main amd64 Packages [7965 B]
Get:20 http://mirrors.aliyun.com/ubuntu xenial-backports/universe amd64 Packages [8532 B]
Get:21 http://mirrors.aliyun.com/ubuntu xenial-security/main Sources [167 kB]
Get:22 http://mirrors.aliyun.com/ubuntu xenial-security/multiverse Sources [2094 B]
Get:23 http://mirrors.aliyun.com/ubuntu xenial-security/universe Sources [95.4 kB]
Get:24 http://mirrors.aliyun.com/ubuntu xenial-security/main amd64 Packages [723 kB]
Get:25 http://mirrors.aliyun.com/ubuntu xenial-security/universe amd64 Packages [491 kB]
Get:26 http://mirrors.aliyun.com/ubuntu xenial-security/multiverse amd64 Packages [3747 B]
Fetched 4583 kB in 2s (2049 kB/s)
Reading package lists... Done
E: The method driver /usr/lib/apt/methods/https could not be found.
N: Is the package apt-transport-https installed?
E: Failed to fetch https://download.docker.com/linux/ubuntu/dists/xenial/InRelease
E: Some index files failed to download. They have been ignored, or old ones used instead.
解決辦法--執行單獨安裝命令:apt-get install apt-transport-https
[email protected]:/# apt-get install apt-transport-https
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libllvm5.0
Use 'apt autoremove' to remove it.
The following NEW packages will be installed:
apt-transport-https
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 26.1 kB of archives.
After this operation, 215 kB of additional disk space will be used.
Get:1 http://mirrors.aliyun.com/ubuntu xenial-updates/main amd64 apt-transport-https amd64 1.2.27 [26.1 kB]
Fetched 26.1 kB in 0s (446 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package apt-transport-https.
(Reading database ... 32433 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_1.2.27_amd64.deb ...
Unpacking apt-transport-https (1.2.27) ...
Setting up apt-transport-https (1.2.27) ...