![百胜安装,格式 - 'packageName.archName-versionNumber' 说没有包](https://linux22.com/image/72556/%E7%99%BE%E8%83%9C%E5%AE%89%E8%A3%85%EF%BC%8C%E6%A0%BC%E5%BC%8F%20-%20'packageName.archName-versionNumber'%20%E8%AF%B4%E6%B2%A1%E6%9C%89%E5%8C%85.png)
当我尝试yum install body_guard
从本地存储库执行操作时,它显示以下包详细信息,
---> Package body_guard.x86_64 0:0.2-0313 will be updated
---> Package body_guard.x86_64 0:0.2-0315 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
============================================================================================================================================
===
Package Arch Version Repository Size
===============================================================================================================================================
Updating:
body_guard x86_64 0.2-0315 my-sg 18 M
当我尝试安装同一 yum 软件包的旧版本(例如 312)时,它失败了No package body_guard.x86_64-0.2-0312 available
我使用连字符作为包名称和版本号之间的分隔符(格式为packageName.archName-versionNumber
),并发出命令为,
yum install body_guard.x86_64-0.2-0312
在执行时yum --showduplicates
,我可以看到存在一个版本号为 - 的包0.2-312
答案1
从百胜手册页:
Specifying package names
A package can be referred to for install,update,list,remove etc
with any of the following:
name
name.arch
name-ver
name-ver-rel
name-ver-rel.arch
name-epoch:ver-rel.arch
epoch:name-ver-rel.arch
For example: yum remove kernel-2.4.1-10.i686
我认为你最后应该放错了 {arch} ,正确的语法是:
yum install <package_name>-<version>-<rel>.<arch>
尝试:
yum install body_guard-0.2-0312.x86_64