简体   繁体   中英

APT: install specific version of a package

I need to install specific package version, but it does not work with 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.

Older version is already installed:

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

But my explicitly specified version does exist:

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

How may I install 2016.03.30-79?

Ok, the problem with APT was that my-lib-java depended on my-lib so the solution is

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

Then it goes through.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM