我修改了 rpm 包,它可以工作,但是当我尝试通过 rpm 安装它时,我遇到了这个问题
[root@vps8865 ~]# cd rpmbuild/
[root@vps8865 rpmbuild]# cd RPMS/
[root@vps8865 RPMS]# ls
x86_64
[root@vps8865 RPMS]# cd x86_64/
[root@vps8865 x86_64]# ls
libblkid-2.23.2-65.el7.1.x86_64.rpm libmount-devel-2.23.2-65.el7.1.x86_64.rpm libuuid-2.23.2-65.el7.1.x86_64.rpm util-linux-debuginfo-2.23.2-65.el7.1.x86_64.rpm
libblkid-devel-2.23.2-65.el7.1.x86_64.rpm libsmartcols-2.23.2-65.el7.1.x86_64.rpm libuuid-devel-2.23.2-65.el7.1.x86_64.rpm uuidd-2.23.2-65.el7.1.x86_64.rpm
libmount-2.23.2-65.el7.1.x86_64.rpm libsmartcols-devel-2.23.2-65.el7.1.x86_64.rpm util-linux-2.23.2-65.el7.1.x86_64.rpm
[root@vps8865 x86_64]# rpm -i util-linux-2.23.2-65.el7.1.x86_64.rpm
error: Failed dependencies:
libblkid = 2.23.2-65.el7.1 is needed by util-linux-2.23.2-65.el7.1.x86_64
libmount = 2.23.2-65.el7.1 is needed by util-linux-2.23.2-65.el7.1.x86_64
libsmartcols = 2.23.2-65.el7.1 is needed by util-linux-2.23.2-65.el7.1.x86_64
libuuid = 2.23.2-65.el7.1 is needed by util-linux-2.23.2-65.el7.1.x86_64
[root@vps8865 x86_64]#
[root@vps8865 x86_64]#
[root@vps8865 x86_64]#
[root@vps8865 x86_64]#
[root@vps8865 x86_64]#
[root@vps8865 x86_64]# yum install libsmartcols
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: pkg.adfinis.com
* epel: mirror.hostnet.nl
* extras: centos.mirror.net-d-sign.de
* updates: mirror.23m.com
Package libsmartcols-2.23.2-65.el7_9.1.x86_64 already installed and latest version
Nothing to do
[root@vps8865 x86_64]# yum install libuuid
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.netzwerge.de
* epel: mirror.hostnet.nl
* extras: centos.mirror.net-d-sign.de
* updates: mirror.23m.com
Package libuuid-2.23.2-65.el7_9.1.x86_64 already installed and latest version
Nothing to do
[root@vps8865 x86_64]# yum install libmount
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: pkg.adfinis.com
* epel: mirror.hostnet.nl
* extras: centos.mirror.net-d-sign.de
* updates: mirror.23m.com
Package libmount-2.23.2-65.el7_9.1.x86_64 already installed and latest version
Nothing to do
[root@vps8865 x86_64]# yum install libblkid
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.netzwerge.de
* epel: mirror.nl.leaseweb.net
* extras: centos.mirror.net-d-sign.de
* updates: mirror.23m.com
Package libblkid-2.23.2-65.el7_9.1.x86_64 already installed and latest version
Nothing to do
[root@vps8865 x86_64]#
答案1
您的软件包是...2.32.2-65.el7.1...
,安装的软件包是...2.32.2-65.el7_9.1...
。通过相同的版本号,它们可能来自相同的源包,并且想必您的也应该如此。
也许您错过了更新规范文件中的某些版本,或者您的dist
宏已关闭(即,它el7.1
在应该的时候读取el7_9.1
。在任何情况下,至少版本(此处为 65)应该晚于上游版本,以便避免RPM数据库混乱(发行包与本地版本+release相同,不同的,安装一个之后肯定会成为娱乐性的烟花)。
答案2
您下载了较旧的源 rpm,或者尚未应用所需的补丁。首先搜索比您现有的源 rpm 更新的源 rpm。