Red Hat Enterprise Linux Workstationバージョン6.7(Santiago)にyumをインストールする方法は?

Red Hat Enterprise Linux Workstationバージョン6.7(Santiago)にyumをインストールする方法は?

yumを使用していくつかのパッケージをインストールしようとしていますが、yumはインストールされません。

$ yum install

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

   No module named yum

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.7.10 (default, Jun 12 2015, 16:19:57) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)]

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

ベストアンサー1

RHEL 6に含まれていないPythonバージョンをインストールしました。 RHEL 6のバージョンは2.6.6です。

RHELではなくPythonを使用しているので、yumモジュールはありません。 /usr/bin/pythonを他のPythonインストールへのシンボリックリンクに変更した場合は、修正して再試行することをお勧めします。

パッケージ化されたPythonを交換した場合は、RHELからPythonパッケージを再インストールする必要があります。最新のrhel6インストールDVD isoをダウンロードし、rpmコマンドを使用してインストールすることをお勧めします。

ただし、この時点では損失と考え、データをバックアップし、rhel7またはrhel8をインストールしてサービスを再生成します。 Rhel6のサポートは11月に終了します。

おすすめ記事