我正在运行 Ubuntu 14.04。我尝试了whereis
、、和命令。whatis
我认为它已安装。我无法再次安装它。我使用来安装软件包。要求它处于某个版本。locate
find
apt-get
virt-manager
答案1
说到可从存储库安装 / 已安装的软件包,您可以使用它apt-cache policy
来检查软件包当前是否已安装,以及如果运行它将升级到哪个版本sudo apt-get upgrade
:
apt-cache policy libosinfo-1.0-0
user@user-X550CL ~ % apt-cache policy libosinfo-1.0-0
libosinfo-1.0-0:
Installed: (none)
Candidate: 0.2.11-1.1
Version table:
0.2.11-1.1 0
500 http://it.archive.ubuntu.com/ubuntu/ vivid/universe amd64 Packages
答案2
因为,libosinfo
不是包名,您可以使用下面的命令。
apt-cache policy ^libosinfo
Installed
和/或的值Candidate
显示版本。
示例输出
libosinfo-1.0-0:
Installed: (none)
Candidate: 0.2.11-1.1
Version table:
0.2.11-1.1 0
500 http://archive.ubuntu.com.archive.ubuntu.com/ubuntu/ vivid/universe amd64 Packages
0.2.11-0ubuntu1~utopic1 0
500 http://ppa.launchpad.net/gnome3-team/gnome3-staging/ubuntu/ vivid/main amd64 Packages
libosinfo-1.0-0-dbg:
Installed: (none)
Candidate: 0.2.11-1.1
Version table:
0.2.11-1.1 0
500 http://archive.ubuntu.com.archive.ubuntu.com/ubuntu/ vivid/universe amd64 Packages
0.2.11-0ubuntu1~utopic1 0
500 http://ppa.launchpad.net/gnome3-team/gnome3-staging/ubuntu/ vivid/main amd64 Packages
libosinfo-1.0-dev:
Installed: (none)
Candidate: 0.2.11-1.1
Version table:
0.2.11-1.1 0
500 http://archive.ubuntu.com.archive.ubuntu.com/ubuntu/ vivid/universe amd64 Packages
0.2.11-0ubuntu1~utopic1 0
500 http://ppa.launchpad.net/gnome3-team/gnome3-staging/ubuntu/ vivid/main amd64 Packages
libosinfo-bin:
Installed: (none)
Candidate: 0.2.11-1.1
Version table:
0.2.11-1.1 0
500 http://archive.ubuntu.com.archive.ubuntu.com/ubuntu/ vivid/universe amd64 Packages
0.2.11-0ubuntu1~utopic1 0
500 http://ppa.launchpad.net/gnome3-team/gnome3-staging/ubuntu/ vivid/main amd64 Packages