%20%E3%81%AB%E4%BE%9D%E5%AD%98%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%E3%81%9F%E3%81%A0%E3%81%97%E3%80%81%E3%82%B7%E3%82%B9%E3%83%86%E3%83%A0%E4%B8%8A%E3%81%AE%20debconf%20%E3%81%AE%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E3%81%AF%201.5.58ubuntu1%20%E3%81%A7%E3%81%99%E3%80%82.png)
Ubuntu 16.04にgitをインストールしようとしたとき、
sudo apt-get install git
debconf-i18n : Depends: debconf (= 1.5.58ubuntu2) but 1.5.58ubuntu1 is to be installed
git : Depends: liberror-perl but it is not going to be installed
Depends: git-man (> 1:2.7.4) but it is not going to be installed
Depends: git-man (< 1:2.7.4-.) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
この問題を解決するには、
sudo apt-get install --reinstall debconf=1.5.58ubuntu2
しかし、次のようなエラーが発生しました。
/var/lib/dpkg/info/debconf.prerm: 15: /var/lib/dpkg/info/debconf.prerm: pyclean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 15: /var/lib/dpkg/tmp.ci/prerm: pyclean: not found
dpkg: error processing archive /var/cache/apt/archives/debconf_1.5.58ubuntu2_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/debconf.postinst: 75: /var/lib/dpkg/info/debconf.postinst: pycompile: not found
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
/var/cache/apt/archives/debconf_1.5.58ubuntu2_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
答え1
問題のあるファイルを手動で編集すると/var/lib/dpkg/info/debconf.prerm
うまくいきました