2
2

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.

間違って/usr/local/bin/にあるpythonインタプリタを削除してしまったときの解決策。

Last updated at Posted at 2020-01-17

はじめに

わたしの開発環境はLinux(Ubuntu)なのですが突然aptコマンドが使えなくなり、エラーを確認したところpythonのライブラリに原因があることが判明しました。いくつかエラーが出ており、うろ覚えですが主な原因はpython3-aptだったと思います。30分ほど試行錯誤しましたが駄目だったので次のやり方で入れ直しました。

参考

こちらがとても参考になりました!

やり方

https://www.python.org/downloads/source/
ここから削除したpythonインタプリタを見つけてGzipped source tarballからダウンロード。

あとはREADME通りにインストールすれば良い。

インストール手順
1. ターミナルを開く
2. ./configure
3. make
4. (make test)
5. sudo make install
2
2
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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?