解決rpm conflicts with file from package問題


[root@harbor opt]# rpm -ivh python27-2.7.9-1.x86_64.rpm
准備中...                          ################################# [100%]
	file /usr/bin/python2.7 from install of python27-2.7.9-1.x86_64 conflicts with file from package python-2.7.5-76.el7.x86_64
	file /usr/share/man/man1/python2.7.1.gz from install of python27-2.7.9-1.x86_64 conflicts with file from package python-2.7.5-76.el7.x86_64
	file /usr/bin/python2.7-config from install of python27-2.7.9-1.x86_64 conflicts with file from package python-devel-2.7.5-76.el7.x86_64
	file /usr/include/python2.7/pyconfig.h from install of python27-2.7.9-1.x86_64 conflicts with file from package python-devel-2.7.5-76.el7.x86_64

方法一

yum -y remove python-2.7.5-76.el7.x86_64
卸載掉沖突的文件,安裝新的文件。如果由於由於依賴關系導致要卸載很多軟件,那可以優先考慮下一個方法。

方法二

rpm -ivh python27-2.7.9-1.x86_64.rpm --replacefiles
安裝的時候增加--replacefiles參數,但是不知道在yum里如何實現。

--replacepkgs 強制重新安裝已經安裝的軟件包
--replacefiles 替換屬於其它軟件包的文件
rpm -e --nodeps python27-2.7.9-1.x86_64.rpm 強制刪除包


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM