我正在尝试安装 Flash Player 插件,但它说 update-notifier-common 未配置。所以我安装了它,sudo dpkg --configure update-notifier-common
它显示
Traceback (most recent call last):
File "/usr/lib/update-notifier/package-data-downloader", line 29, in <module>
import debconf
ImportError: No module named debconf
dpkg: error processing update-notifier-common (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
update-notifier-common
但sudo apt-get install debconf
给予
Setting up update-notifier-common (0.147.1) ...
Traceback (most recent call last):
File "/usr/lib/update-notifier/package-data-downloader", line 29, in <module>
import debconf
ImportError: No module named debconf
dpkg: error processing update-notifier-common (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of flashplugin-installer:
flashplugin-installer depends on update-notifier-common (>= 0.119ubuntu2); however:
Package update-notifier-common is not configured yet.
dpkg: error processing flashplugin-installer (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
update-notifier-common
flashplugin-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
因此,看来我只有在安装 debconf 后才能配置 update-notifier-common,而只有在安装 debconf 并配置 update-notifier-common 后才能安装 debconf。帮忙?
答案1
由于缺少 debconf 库,您的 debconf 安装似乎已损坏。如果您没有看到以下内容:
$ ls -l /usr/lib/python2.7/dist-packages/debconf.py*
lrwxrwxrwx 1 root root 34 nov 3 14:20 /usr/lib/python2.7/dist-packages/debconf.py -> ../../../share/pyshared/debconf.py
-rw-r--r-- 1 root root 6013 dic 9 01:58 /usr/lib/python2.7/dist-packages/debconf.pyc
$ ls -l /usr/share/pyshared/debconf.py
-rw-r--r-- 1 root root 5971 nov 3 14:20 /usr/share/pyshared/debconf.py
那你就麻烦大了。你可以尝试使用以下方法修复它:
mkdir -p ~/debconf.bk
sudo mv /usr/lib/python2.7/dist-packages/debconf.pyc ~/debconf.bk
sudo mv /usr/share/pyshared/debconf.py ~/debconf.bk
apt-get download debconf
dpkg --extract debconf*.deb
sudo pycompile -p debconf
sudo apt-get -f install
答案2
不需要 Braiam 指定的漫长过程。
sudo apt-get install --reinstall debconf
应该可以让你走。
答案3
您需要更新您的/usr/bin/python
Python 版本至 2.7