yum命令不可用

centos7装完python3后,python2.7.5python3同时存在,导致yum命令不可用

现象:

root@host~# yum

There was a problem importing one of the Python modules

required to run yum. The error leading to this problem was:

   /usr/1ib64/python2.7/site-packages/pycur1.so: undefined symbo1: cRpTo_num_1ocks  

Please insta1l a package which provides this module, or

verify that the module is installed correctly.

It's possible that the above module doesn't match the

current version of Python, which is:2.7.5(default.Nov 20 2015.02:00:19)Gcc 4.8.5 20150623(Red Hat 4.8.5-4)]

If you cannot solve this problem yourself, please go to the yum fag at:

  http://yum.baseur1.org/wiki/Faq

解决:

[root@host ~]# ldd /usr/lib64/python2.7/site-packages/pycurl.so

    linux-vdso.so.1 =>  (0x00007ffc3cf18000)

    libcurl.so.4 => /data/panwei/lib/libcurl.so.4 (0x00002acbe92d1000)

    libpython2.7.so.1.0 => /lib64/libpython2.7.so.1.0 (0x00002acbe9558000)

    libpthread.so.0 => /lib64/libpthread.so.0 (0x00002acbe991e000)

    libc.so.6 => /lib64/libc.so.6 (0x00002acbe9b3a000)

    libssl.so.1.1 => /usr/local/openssl/lib/libssl.so.1.1 (0x00002acbe9efb000)

    libcrypto.so.1.1 => /usr/local/openssl/lib/libcrypto.so.1.1 (0x00002acbea18e000)

    libz.so.1 => /data/panwei/lib/libz.so.1 (0x00002acbea676000)

    libdl.so.2 => /lib64/libdl.so.2 (0x00002acbea88d000)

    libutil.so.1 => /lib64/libutil.so.1 (0x00002acbeaa91000)

    libm.so.6 => /lib64/libm.so.6 (0x00002acbeac94000)

    /lib64/ld-linux-x86-64.so.2 (0x00002acbe8e9c000)

[root@host ~]#

[root@host ~]# cat /etc/ld.so.conf

include ld.so.conf.d/*.conf

/usr/local/openssl/lib

/usr/local/bin/

/data/sellion/lib(此为自己的安装目录或使用目录,将其删除)

[root@host ~]# cp /etc/ld.so.conf /etc/ld.so.conf_bk20240112

[root@host ~]# vi /etc/ld.so.conf

[root@host ~]# cat /etc/ld.so.conf

include ld.so.conf.d/*.conf

/usr/local/openssl/lib

/usr/local/bin/

[root@host ~]# ldconfig   文件立即生效

删除其他的路径后即可以使用yum

  • 23
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值