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文件,传到服务器上运行安装后就可以了正常使用了!