apt-get 损坏:没有名为 debian.deb822 的模块

apt-get 损坏:没有名为 debian.deb822 的模块

系统路径:

['/usr/lib/update-notifier', '/usr/local/lib/python26.zip', '/usr/local/lib/python2.6', '/usr/local/lib/python2.6/plat-linux3', '/usr/local/lib/python2.6/lib-tk', '/usr/local/lib/python2.6/lib-old', '/usr/local/lib/python2.6/lib-dynload', '/usr/local/lib/python2.6/site-packages']
terry@terrylaptop:/usr/lib$ sudo apt-get install python-debian
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-debian is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 239 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up update-notifier-common (0.119ubuntu8.6) ...
Traceback (most recent call last):
  File "/usr/lib/update-notifier/package-data-downloader", line 26, in <module>
    import debian.deb822
ImportError: No module named debian.deb822
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)

每次我尝试使用 apt-get install 更新我的 Ubuntu 时都会出现这个问题。我使用的是 12.04.01 LTS。

我还从此链接安装了 python-debian: http://pkgs.org/ubuntu-12.04/ubuntu-main-i386/python-debian_0.1.21ubuntu1_all.deb.html 但它不起作用。

有人能帮助我吗?非常感谢。我在 Google 上搜索过,但似乎这个问题在旧版本中已经修复了。

terry@terrylaptop:/usr/lib$ sudo apt-get install dolphin
Reading package lists... Done
Building dependency tree       
Reading state information... Done
dolphin is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 239 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up update-notifier-common (0.119ubuntu8.6) ...
['/usr/lib/update-notifier', '/usr/local/lib/python26.zip', '/usr/local/lib/python2.6', '/usr/local/lib/python2.6/plat-linux3', '/usr/local/lib/python2.6/lib-tk', '/usr/local/lib/python2.6/lib-old', '/usr/local/lib/python2.6/lib-dynload', '/usr/local/lib/python2.6/site-packages']
Traceback (most recent call last):
  File "/usr/lib/update-notifier/package-data-downloader", line 29, in <module>
    import debian.deb822
ImportError: No module named debian.deb822
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)
terry@terrylaptop:/usr/lib$ ls /usr/local/lib/python2.6/debian.deb822.py 
/usr/local/lib/python2.6/debian.deb822.py

terry@terrylaptop:/usr/lib$ cat /usr/local/lib/python2.6/debian.deb822.py
import warnings

warnings.warn("please use 'debian.deb822' instead", DeprecationWarning,
              stacklevel=2)

from debian.deb822 import *

您可以在/usr/local/lib/python2.6中看到debian.deb822,但是仍然找不到它。

------2/20 最新更新----------------

terry@terrylaptop:/usr/local/bin$ ls -l /usr/bin/py*
-rwxr-xr-x 1 root root  3752 May  2  2012 /usr/bin/py3_compilefiles
-rwxr-xr-x 1 root root 97759 May  2  2012 /usr/bin/pycentral
-rwxr-xr-x 1 root root  4124 Apr 18  2012 /usr/bin/pyclean
-rwxr-xr-x 1 root root 11933 Apr 18  2012 /usr/bin/pycompile
-rwxr-xr-x 1 root root  3723 May  2  2012 /usr/bin/py_compilefiles
lrwxrwxrwx 1 root root     8 Apr 27  2012 /usr/bin/pydoc -> pydoc2.7
-rwxr-xr-x 1 root root    79 Aug  1  2012 /usr/bin/pydoc2.7
lrwxrwxrwx 1 root root    12 Apr 27  2012 /usr/bin/pygettext -> pygettext2.7
-rwxr-xr-x 1 root root 22103 Aug  1  2012 /usr/bin/pygettext2.7
-rwxr-xr-x 1 root root   217 Mar  9  2012 /usr/bin/pyhtmlizer
lrwxrwxrwx 1 root root    24 Feb 20 07:24 /usr/bin/python -> /usr/loca/bin/python2.7
lrwxrwxrwx 1 root root    24 Jun 14  2012 /usr/bin/python2 -> /usr/local/bin/python2.6
lrwxrwxrwx 1 root root    24 Jun 14  2012 /usr/bin/python2.6 -> /usr/local/bin/python2.6
lrwxrwxrwx 1 root root    29 Apr 27  2012 /usr/bin/pyversions -> ../share/python/pyversions.py

terry@terrylaptop:/usr/local/bin$ ls -l /usr/local/bin/py*
-rwxrwxr-x 1 root root      84 Feb 20 07:21 /usr/local/bin/pydoc
lrwxrwxrwx 1 root root      24 Feb 20 07:31 /usr/local/bin/python -> /usr/local/bin/python2.7
lrwxrwxrwx 1 root root       9 Feb 20 07:23 /usr/local/bin/python2 -> python2.7
-rwxr-xr-x 1 root root 4610075 Jun 14  2012 /usr/local/bin/python2.6
-rwxr-xr-x 1 root root    1424 Jun 14  2012 /usr/local/bin/python2.6-config
-rwxr-xr-x 1 root root 4917197 Feb 20 07:22 /usr/local/bin/python2.7
-rwxr-xr-x 1 root root    1624 Feb 20 07:23 /usr/local/bin/python2.7-config
lrwxrwxrwx 1 root root      16 Feb 20 07:23 /usr/local/bin/python2-config -> python2.7-config
lrwxrwxrwx 1 root root      14 Feb 20 07:23 /usr/local/bin/python-config -> python2-config

我仍然无法安装。sys.path 是:

['/usr/lib/update-notifier', '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-linux2', '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old', '/usr/local/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/site-packages']

------2013/2/22 更新---------------

terry@terrylaptop:/data$ sudo apt-get install python2.7
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python2.7 is already the newest version.
The following packages were automatically installed and are no longer required:
  libnepomukdatamanagement4 libkexiv2-10 libkdegames5a libboost-program-options1.46.1 libkdecorations4 libkwinglutils1 libnepomuksync4  libokularcore1abi1 libssl0.9.8 libattica0.3 liblastfm0 libkwineffects1abi3
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
5 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.

答案1

尝试重新安装应该包含 debian.deb822 的软件包:

sudo apt-get --reinstall install python-debian

在新版本的 Ubuntu 上

sudo apt-get --reinstall install python3-debian

答案2

就我而言,我必须卸载所有有冲突的软件包,例如update-notifierupdate-notifier-common等,然后运行:

sudo apt install --reinstall python-debian python3-debian python-chardet python3-chardet

答案3

我使用 apt-get remove 命令来删除更新通知程序通用flashplugin 安装程序然后解决问题。

命令如下:

sudo apt-get remove  update-notifier-common flashplugin-installer

答案4

您可能删除了 python debian 包,请运行这些命令来重新安装 python-debian,然后安装 update-notifier 包。

sudo apt-get remove  update-notifier-common
sudo apt-get autoremove
sudo apt-get --reinstall install python-debian
sudo apt-get install  update-notifier

相关内容