未找到刚刚安装的包

未找到刚刚安装的包

我正在尝试在 Ubuntu 14.04 VM 上安装 Docker。我运行了sudo apt-get install docker,假设它会工作,因为,你知道,这就是软件包的安装方式。

仅当安装完成后,当尝试运行任何 docker 命令时,我才会被告知 docker 未安装,并且我应该尝试 apt-get 它。

我尝试了两种方法which docker,并whereis docker尝试从其位置运行它,但这两种方法似乎都表明 docker 并未真正安装。如果我再次尝试 apt-get docker,系统会提示我已安装。然后我删除并重新安装了 docker 以尝试修复此问题,但仍然发生同样的问题。我该如何解决此问题?

编辑

命令输出:

j@devstack01:~$ sudo apt-get install docker -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  docker
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/12.2 kB of archives.
After this operation, 65.5 kB of additional disk space will be used.
Selecting previously unselected package docker.
(Reading database ... 113727 files and directories currently installed.)
Preparing to unpack .../docker_1.5-1_amd64.deb ...
Unpacking docker (1.5-1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up docker (1.5-1) ...
j@devstack01:~$ 


j@devstack01:~$ which docker
j@devstack01:~$

j@devstack01:~$ whereis docker
docker:
j@devstack01:~$

j@devstack01:~$ docker
The program 'docker' is currently not installed. You can install it by typing:
sudo apt-get install docker
j@devstack01:~$

j@devstack01:~$ apt-cache policy docker
docker:
  Installed: 1.5-1
  Candidate: 1.5-1
  Version table:
 *** 1.5-1 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/universe amd64 Packages
        100 /var/lib/dpkg/status
     1.4-5ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
jn@devstack01:~$

jfarzan@devstack01:~$ dpkg --get-selections | grep docker
docker                                          install
jfarzan@devstack01:~$

答案1

dockerUbuntu 14.04 Universe 存储库中的软件包为 GNOME2 应用程序提供了系统托盘。

显然,您需要 docker 容器。正确的软件包是docker.io

通过以下方式安装:

sudo apt-get install docker.io

14.04 Universe 存储库中的软件包版本为 0.9.1。如果要安装最新版本,请按照本官方指南

相关内容