遇到的問題:
按照docker官方安裝教程,執行到:
sudo apt-get install docker-ce
安裝失敗,出現如下錯誤:
The following packages have unmet dependencies:
docker-ce : Depends: libltdl7 (>= 2.4.6) but it is not going to be installed
Recommends: aufs-tools but it is not going to be installed
Recommends: cgroupfs-mount but it is not installable or
cgroup-lite but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
如圖:
image.png
此問題源于libltdl7版本過低,ubuntu16.04默認無更高版本。
解決辦法:
搜索到libltdl7 2.4.6的包,下載:
wget http://launchpadlibrarian.net/236916213/libltdl7_2.4.6-0.1_amd64.deb
如圖:
image.png
安裝deb包:
sudo dpkg -i libltdl7_2.4.6-0.1_amd64.deb
如圖:
image.png
再次安裝docker-ce。
sudo apt-get install docker-ce
如圖:
image.png
image.png