libz.so.1: cannot open shared object file: No such file or directory

还是之前那个问题,yum安装的时候报错

yum -y install net-snmp net-snmp-devel curl-devel java-1.8.0-openjdk java-1.8.0-openjdk-devel OpenIPMI-devel libssh2-devel

报错信息是

   Error: Package: rpm-devel-4.11.3-25.el7.x86_64 (mnt)
           Requires: rpm-libs(x86-64) = 4.11.3-25.el7
           Installed: rpm-libs-4.11.3-32.el7.x86_64 (@rhel7)
               rpm-libs(x86-64) = 4.11.3-32.el7
           Available: rpm-libs-4.11.3-25.el7.x86_64 (mnt)
               rpm-libs(x86-64) = 4.11.3-25.el7
Error: Package: rpm-devel-4.11.3-25.el7.x86_64 (mnt)
           Requires: rpm-build-libs(x86-64) = 4.11.3-25.el7
           Installed: rpm-build-libs-4.11.3-32.el7.x86_64 (@rhel7)
               rpm-build-libs(x86-64) = 4.11.3-32.el7
           Available: rpm-build-libs-4.11.3-25.el7.x86_64 (mnt)
               rpm-build-libs(x86-64) = 4.11.3-25.el7
Error: Package: rpm-devel-4.11.3-25.el7.x86_64 (mnt)
           Requires: rpm = 4.11.3-25.el7
           Installed: rpm-4.11.3-32.el7.x86_64 (@rhel7)
               rpm = 4.11.3-32.el7
           Available: rpm-4.11.3-25.el7.x86_64 (mnt)
               rpm = 4.11.3-25.el7
Error: Package: rpm-libs-4.11.3-25.el7.i686 (mnt)
           Requires: rpm = 4.11.3-25.el7
           Installed: rpm-4.11.3-32.el7.x86_64 (@rhel7)
               rpm = 4.11.3-32.el7
           Available: rpm-4.11.3-25.el7.x86_64 (mnt)
               rpm = 4.11.3-25.el7
 You could try using --skip-broken to work around the problem
** Found 5 pre-existing rpmdb problem(s), 'yum check' output follows:
libselinux-devel-2.5-11.el7.x86_64 has missing requires of libselinux(x86-64) = ('0', '2.5', '11.el7')
libselinux-utils-2.5-11.el7.x86_64 has missing requires of libselinux(x86-64) = ('0', '2.5', '11.el7')
pam-1.1.8-22.el7.i686 has missing requires of libselinux.so.1
systemd-libs-219-57.el7.i686 has missing requires of libselinux.so.1
zlib-1.2.7-17.el7.x86_64 is a duplicate with zlib-1.2.7-15.el7.i686

rpm -qa|grep zlib的时候有两个版本,卸载旧的版本之后,出现如题报错,我就纳闷了,不是有这个包吗

再次查看

# rpm -qa|grep zlib
zlib-1.2.7-15.el7.i686
zlib-devel-1.2.7-17.el7.x86_64

版本也在,按照网上说的重新安装是不可能了,查找这个文件

# find / -name libz.so.1
/usr/lib/libz.so.1
/usr/local/lib/libz.so.1

libz.so.1文件还在,我之前编译安装过zlib

所以做个软链接就好了

ln -s /usr/local/lib/libz.so.1 /lib64/libz.so.1

 

posted @ 2019-09-05 16:30  augusite  阅读(5725)  评论(1编辑  收藏  举报