yum 因缺少 Python 模組而損壞 (RHEL 6.4)

yum 因缺少 Python 模組而損壞 (RHEL 6.4)

當我跑步時$ yum我看到:

There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   /usr/lib64/libssh2.so.1: symbol EVP_aes_128_ctr, version libcrypto.so.10 not defined in file libcrypto.so.10 with link time reference

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, Oct 12 2012, 14:23:48) 
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)]

If you cannot solve this problem yourself, please go to 
the yum faq at:
  http://yum.baseurl.org/wiki/Faq

我更新了 Python,現在如果我運行$ python --version我會看到Python 2.7.12rc1.但根據錯誤,這與當前版本不符。有任何想法嗎?謝謝!

答案1

也許無需重新安裝作業系統的更好方法是下載 python 套件(可能還有任何 python 模組套件)並用於rpm在升級後的 Python 上安裝它們。

RHEL 6 的 python 套件應該可以python-2.6.6-64.el6.x86_64從 Red Hat 取得,或者您可以從 RHEL6 .iso 檔案中取得它。您可能必須使用--forceRPM 上的選項,因為它必須覆蓋套件和任何檔案。

之後yum應該可以工作,儘管 Python 升級仍然存在一些問題。升級 Python 時,請確保將--prefix其安裝在以下位置:/usr/local/python2.7.12或遠離系統 Python 檔案的任何位置。

相關內容