6
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

yum「bad interpreter」エラーの対処

Last updated at Posted at 2016-12-27

yumコマンド叩くと
「/usr/bin/yum: /usr/bin/python: bad interpreter: そのようなファイルやディレクトリはありません」
といったエラーが出た際の対処

yum本体のディレクトリへ移動

cd /usr/bin/

pythonのパスを確認

ll | grep python

/usr/bin/yumのファイルを確認

vi /usr/bin/yum

以下のパスになっています

#!/usr/bin/python

/usr/bin/pythonのシンボリックリンクがないようだったので作成
(上記で確認したpythonのパスをリンク先に指定します)

ln -s /usr/bin/python2.6 /usr/bin/python

これでyumコマンドが通るようになりました。

以上

6
4
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?