之路教程 https://onitr oad .com
解决方法
当有多个版本可用时,
默认情况下,当我们没有为包指定版本时,将安装最新版本。
以下过程要求我们以 root 身份登录。
- 清理yum缓存目录
# yum clean all
- 要安装特定版本的软件包,我们必须知道存储库中可用的软件包版本。
列出所有可用的软件包版本:
# yum --showduplicate list [package_name]
例如 :
# yum --showduplicate list firefox Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast Available Packages firefox.x86_64 24.5.0-1.el7 RHEL7 firefox.x86_64 24.6.0-1.el7_0 RHEL7 firefox.x86_64 24.7.0-1.el7_0 RHEL7 firefox.x86_64 24.8.0-1.el7_0 .....
- 使用第二列中的版本号安装特定版本的firefox包。
语法 :
# yum install [package-name]-[version].[architecture]
例如 :
# yum install firefox-24.8.0-1.el7_0.x86_64
问题
如何使用 yum 安装特定的 rpm 包版本?
日期:2020-09-17 00:12:16 来源:oir作者:oir