Python モジュールが不足しているため、yum が壊れています (RHEL 6.4)

Python モジュールが不足しているため、yum が壊れています (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

おそらく、OS を再インストールせずに Python パッケージ (および場合によっては Python モジュール パッケージ) をダウンロードし、rpmアップグレードした Python にインストールする方がよい方法でしょう。

RHEL 6 用の Python パッケージは、python-2.6.6-64.el6.x86_64Red Hat から入手できるはずです。または、RHEL6 .iso ファイルから取得することもできます。--forceパッケージとファイルを上書きする必要があるため、RPM のオプションを使用する必要がある可能性があります。

その後はyum動作するはずですが、Python のアップグレードによる不要なファイルがまだ残っています。Python をアップグレードするときは、次の場所、またはシステムの Python ファイルから離れた場所に--prefixインストールするようにしてください。/usr/local/python2.7.12

関連情報