APT:安装特定版本的软件包

时间:2016-04-19 18:52:36

标签: ubuntu debian apt

我需要安装特定的软件包版本,但它不适用于APT:

root@myhost:~# apt-get install my-lib-java=2016.03.30-79
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  my-lib-java
0 upgraded, 0 newly installed, 0 to remove and 93 not upgraded.

已安装旧版本:

root@myhost:~# dpkg -l | grep my-lib-java
ii  my-lib-java                  2016.02.25-3-g5aa415e-75            amd64        no description given

但我明确指定的版本确实存在:

root@myhost:~# apt-cache madison my-lib-java
my-lib-java | 2016.04.19-86 | https://my.re.po/dl/ubuntu/ trusty/ Packages
my-lib-java | 2016.03.30-79 | https://my.re.po/dl/ubuntu/ trusty/ Packages
my-lib-java | 2016.02.25-73 | https://my.re.po/dl/ubuntu/ trusty/ Packages

我如何安装2016.03.30-79?

1 个答案:

答案 0 :(得分:2)

好的,APT的问题是my-lib-java依赖于my-lib所以解决方案是

apt-get install my-lib-java=2016.03.30-79 my-lib=2016.03.30-79

然后它就会通过。