Centos

安裝修改後的 rpm 時出現問題

  • August 23, 2021

我修改了 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]#

你的包是...2.32.2-65.el7.1...,安裝的包是 ...2.32.2-65.el7_9.1.... 通過相同的版本號,它們可能來自相同的原始碼包,並且可能您的原始碼包也應該如此。

也許您錯過了更新規範文件中的某些版本,或者您的dist宏已關閉(即,el7.1它應該在什麼時候讀取el7_9.1。無論如何,至少發布(此處為 65)應該晚於上游版本,以便避免 RPM 數據庫混淆(發行包與本地版本+release相同,不同的,安裝一個肯定是為了以後娛樂煙花)。

引用自:https://unix.stackexchange.com/questions/665963