LoginSignup
1
2

More than 3 years have passed since last update.

aptでパッケージ操作が一切できなくなった(pipで解決)

Last updated at Posted at 2018-01-29

apt-get upgradeでエラー発生

ある日普通にapt-get upgradeをしたところ、以下のようなエラーが発生。

Error
Setting up update-notifier-common (3.168.4) ...
Traceback (most recent call last):
File "/usr/lib/update-notifier/package-data-downloader", line 24, in 
<module>
import debian.deb822
ImportError: No module named 'debian'
dpkg: error processing package update-notifier-common (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
update-notifier-common
E: Sub-process /usr/bin/dpkg returned an error code (1)

どうやらupdate-notifier-commonというパッケージがpythonで
import debian
をしたときに
ImportError: No module named 'debian'
エラーが返ってきているようだ。

このままではupdate-notifier-commonというパッケージが未設定として残っているため、apt-getコマンドを使った操作はエラーとなってしまう。つまりapt-getを使ったあらゆるインストールが出来ない状態。

pipでpython-debianをインストールして解決

sudo pip install python-debian

1
2
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
1
2