Cent os 升級python到2.5後yum安裝出錯

來源:互聯網
上載者:User

# yum list
Loading "priorities" plugin
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.main(sys.argv[1:])
File "/usr/share/yum-cli/yummain.py", line 105, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 289, in doCommands
self._getTs()
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 85, in _getTs
self._getTsInfo()
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 91, in _getTsInfo
self._tsInfo.setDatabases(self.rpmdb, self.pkgSack)
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 537, in <lambda>
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 392, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.4/site-packages/yum/repos.py", line 242, in populateSack
sack.populate(repo, mdtype, callback, cacheonly)
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 168, in populate
dobj = repo_cache_function(xml, csum)
File "/usr/lib64/python2.4/site-packages/sqlitecachec.py", line 42, in getPrimary
self.repoid))
TypeError: Parsing primary.xml error: Start tag expected, '<' not found

解決方案
cd /usr/local/src
wget http://www.gzip.org/zlib/zlib-1.2.3.tar.gz
tar -zxvf zlib-1.2.3.tar.gz
cd /usr/local/src/zlib-1.2.3
make clean
./configure --prefix=/usr/local
make
make install

cd /usr/local/src
wget ftp://xmlsoft.org/libxml2/libxml2-cvs-snapshot.tar.gz

或wget ftp://xmlsoft.org/libxml2/libxml2-git-snapshot.tar.gz

tar -zxvf libxml2-cvs-snapshot.tar.gz
cd /usr/local/src/libxml2-*
./configure --with-zlib=/usr/local
make
make install

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.