一、起因:我想搭建LNMP環境,需要安裝以下rpm包
在使用源碼包安裝服務程序之前,首先要讓安裝主機具備編譯程序源碼的環境,他需要具備C語言、C++語言、Perl語言的編譯器,以及各種常見的編譯支持函數庫程序。
因此請先配置妥當Yum軟件倉庫,然后把下面列出的這些軟件包都統統安裝上:
1 [root@linuxprobe ~]# yum install -y apr* autoconf automake bison
bzip2 bzip2* compat* cpp curl curl-devel fontconfig fontconfig-devel freetype freetype* freetype-devel
gcc gcc-c++ gd gettext gettext-devel glibc kernel kernel-headers keyutils keyutils-libs-devel krb5-devel
libcom_err-devel libpng libpng-devel libjpeg* libsepol-devel libselinux-devel libstdc++-devel libtool* libgomp
libxml2 libxml2-devel libXpm* libtiff libtiff* make mpfr ncurses* ntp openssl openssl-devel patch pcre-devel perl
php-common php-gd policycoreutils telnet t1lib t1lib* nasm nasm* wget zlib-devel
二、問題:出現報錯
1 Transaction check error: 2 file /etc/libvirt/libvirt.conf from install of libvirt-libs-4.5.0-23.el7_7.6.x86_64 conflicts with file from package libvirt-client-1.1.1-29.el7.x86_64 3 file /usr/lib64/libvirt-lxc.so.0 from install of libvirt-libs-4.5.0-23.el7_7.6.x86_64 conflicts with file from package libvirt-client-1.1.1-29.el7.x86_64 4 file /usr/lib64/libvirt-qemu.so.0 from install of libvirt-libs-4.5.0-23.el7_7.6.x86_64 conflicts with file from package libvirt-client-1.1.1-29.el7.x86_64 5 file /usr/lib64/libvirt.so.0 from install of libvirt-libs-4.5.0-23.el7_7.6.x86_64 conflicts with file from package libvirt-client-1.1.1-29.el7.x86_64 6 file /usr/share/libvirt/cpu_map.xml from install of libvirt-libs-4.5.0-23.el7_7.6.x86_64 conflicts with file from package libvirt-client-1.1.1-29.el7.x86_64 7 file /usr/share/libvirt/schemas/basictypes.rng from install of libvirt-libs-4.5.0-23.el7_7.6.x86_64 conflicts with file from package libvirt-client-1.1.1-29.el7.x86_64 8 file /usr/share/libvirt/schemas/capability.rng from install of libvirt-libs-4.5.0-23.el7_7.6.x86_64 conflicts with file from package libvirt-client-1.1.1-29.el7.x86_64 9 file /usr/share/libvirt/schemas/domain.rng from install of libvirt-libs-4.5.0-23.el7_7.6.x86_64 conflicts with file from package libvirt-client-1.1.1-29.el7.x86_64 10 file /usr/share/libvirt/schemas/domaincommon.rng from install of libvirt-libs-4.5.0-23.el7_7.6.x86_64 conflicts with file from package libvirt-client-1.1.1-29.el7.x86_64 11 file /usr/share/libvirt/schemas/domainsnapshot.rng from install of libvirt-libs-4.5.0-23.el7_7.6.x86_64 conflicts with file from package libvirt-client-1.1.1-29.el7.x86_64 12 file /usr/share/libvirt/schemas/interface.rng from install of libvirt-libs-4.5.0-23.el7_7.6.x86_64 conflicts with file from package libvirt-client-1.1.1-29.el7.x86_64 13 file /usr/share/libvirt/schemas/network.rng from install of libvirt-libs-4.5.0-23.el7_7.6.x86_64 conflicts with file from package libvirt-client-1.1.1-29.el7.x86_64 14 file /usr/share/libvirt/schemas/networkcommon.rng from install of libvirt-libs-4.5.0-23.el7_7.6.x86_64 conflicts with file from package libvirt-client-1.1.1-29.el7.x86_64
………………省略
我們可以查看一些相關信息
[root@localhost ~]# rpm -qa | grep libvirt* [root@localhost ~]# rpm -qi libvirt-client-1.1.1-29.el7.x86_64 [root@localhost ~]# rpm -ql libvirt-client-1.1.1-29.el7.x86_64 …………省略
三、解決:方法是把不需要的版本刪掉(低版本)
1 [root@localhost admin]# yum -y update libvirt-client
方法一:使用yum來升級CentOS 7.0老舊的包。
yum -y remove libvirt-client-1.1.1-29.el7.x86_64
方法二:使用yum來卸載,若用此法卸載該安裝包,會造成相關依賴包也被卸載,最后系統會黑屏!這也是我一直錯誤的地方。
好吧,我得承認,這個方法並不有效。
