yum/apt 安装指定版本



yum(CentOS) 历史版本

yum 源只有最新的 rpm 包版本,历史版本需要使用如下的源



~$ yum --showduplicates list dpdk
Loaded plugins: copr, versionlock
Available Packages
dpdk.x86_64                                       16.11.2-4.el7                                       dpdk  
dpdk.x86_64                                       17.11-7.el7                                         dpdk  
dpdk.x86_64                                       17.11-11.el7                                        dpdk  
dpdk.x86_64                                       17.11-13.el7                                        dpdk  
dpdk.x86_64                                       17.11-13.el7                                        extras
dpdk.x86_64                                       17.11-15.el7                                        extras
dpdk.x86_64                                       18.11-2.el7_6                                       extras
dpdk.x86_64                                       18.11-3.el7_6                                       extras
dpdk.x86_64                                       18.11-4.el7_6                                       extras
~$ sudo yum install dpdk-17.11-15.el7
Loaded plugins: copr, versionlock
Resolving Dependencies
--> Running transaction check
---> Package dpdk.x86_64 0:17.11-15.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

 Package               Arch                    Version                        Repository               Size
 dpdk                  x86_64                  17.11-15.el7                   extras                  1.5 M

Transaction Summary
Install  1 Package

Total download size: 1.5 M
Installed size: 4.3 M
Is this ok [y/d/N]: y


~$ apt policy dpdk
  Installed: 17.11.5-0~ubuntu18.04.1
  Candidate: 17.11.5-0~ubuntu18.04.1
  Version table:
 *** 17.11.5-0~ubuntu18.04.1 500
        500 http://mirrors.ustc.edu.cn/ubuntu bionic-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     17.11.1-6 500
        500 http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 Packages
~$ sudo apt install dpdk=17.11.1-6
The following packages will be DOWNGRADED:
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 1 not upgraded.
Need to get 264 kB of archives.
After this operation, 5,120 B disk space will be freed.
Do you want to continue? [Y/n] y

最后修改于 2019-05-29