LoginSignup
0
0

More than 1 year has passed since last update.

yumコマンド実行時にexcept KeyboardInterrupt, e:とエラー出る場合の対処法

Last updated at Posted at 2021-09-16

事象

EC2 インスタンスに awslogs パッケージをインストールしようとしたらエラーになった。

#sudo yum install -y awslogs

  File "/bin/yum", line 30
    except KeyboardInterrupt, e:
                            ^
SyntaxError: invalid syntax

原因

pythonの3になった際、シンボリックリンクを書き換えてしまったらしい

yumコマンドがpythonで書かれているので、
以下の2つのファイルのスクリプトの先頭行の部分を、python2に修正することで対応する

/usr/bin/yum
/usr/libexec/urlgrabber-ext-down

#!/usr/bin/python

#/usr/bin/python2

再度awslogs パッケージをインストールコマンド実行

#sudo yum install -y awslogs

これでyum コマンドでのエラーが解消できているはず。

0
0
0

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
0
0