python导入libxml2.so.2出错的解决方案

有个别朋友遇到这样的问题,尤其是使用fedora的人们,升级过程中出现错误,提示下面的信息:

upgrading all packages with command yum -y update ..

there was a problem importing one of the python modules
required to run yum. the error leading to this problem was:

libxml2.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.5.1 (r251:54863, oct 30 2007, 13:54:11)
[gcc 4.1.2 20070925 (red hat 4.1.2-33)]

if you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/yumfaq

.. upgrade failed!

这样解决呢,我来告诉你,首先在网上搜索“libxml2.so.2”,我这里搜索后打开的是http://rpmfind.net/linux/rpm2html/search.php?query=libxml2.so.2

从里面下载对应的“libxml2.so.2”rpm文件,传到服务器上运行安装后就可以了正常使用了!

发表评论