yum升级时,报错:
There was a problem importing one of the Python modules required to run yum. The error leading to this problem was: libiconv.so.2: cannot open shared object file: No such file or directory Please install 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.6.6 (r266:84292, Aug 18 2016, 14:53:48) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] If you cannot solve this problem yourself, please go to the yum faq at: http://yum.baseurl.org/wiki/Faq
然后想起昨天编译安装libiconv了,难道没安装好?
于是重新编译安装一次后,查看这个文件是否存在:
find / -name "libiconv.so.2" -print
输出:
/usr/local/lib/libiconv.so.2 /root/libiconv-1.15/lib/.libs/libiconv.so.2
文件存在啊,可问题依然。
参考:http://forum.amule.org/index.php?topic=4715.0
更新系统动态连接库配置:
echo /usr/local/lib >> /etc/ld.so.conf && ldconfig
然后执行yum,问题解决。