升级后依赖损坏

big*_*ree 8 upgrade package-management python 13.04 software-installation

之后apt-get upgrade 我收到以下错误:

Reading package lists... Done
Building dependency tree      
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 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 python3.3-minimal (3.3.1-1ubuntu5) ...
Traceback (most recent call last):
File "/usr/lib/python3.3/py_compile.py", line 8, in <module>
    import imp
  File "/usr/lib/python3.3/imp.py", line 28, in <module>
    import tokenize
  File "/usr/lib/python3.3/tokenize.py", line 28, in <module>
    import re
  File "/usr/lib/python3.3/re.py", line 122, in <module>
    import sre_compile
  File "/usr/lib/python3.3/sre_compile.py", line 14, in <module>
    import sre_parse
  File "/usr/lib/python3.3/sre_parse.py", line 17, in <module>
    from sre_constants import *
  File "/usr/lib/python3.3/sre_constants.py", line 18, in <module>
    from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT
dpkg: error processing python3.3-minimal (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python3.3:
 python3.3 depends on python3.3-minimal (= 3.3.1-1ubuntu5); however:
  Package python3.3-minimal is not configured yet.

dpkg: error processing python3.3 (--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:
 python3.3-minimal
 python3.3
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)

而且我的电脑关不掉...

我想我没有正确安装 python 3.3,但我该如何修复它?

编辑:我试过了,apt-get --reinstall install python2 python2-support 但我得到了:同样的错误

编辑:更多信息

在我的系统上:Linux Mycomputer 3.5.0-34-generic #55-Ubuntu SMP Thu Jun 6 20:20:19 UTC 2013 i686 i686 i686 GNU/Linux

dpkg --print-architecture   
i386
Run Code Online (Sandbox Code Playgroud)

我曾经有 ubuntu 12.10。当我尝试将其升级到 13.04 时出现了我的问题。我收到一条错误消息,告诉我该进程因错误太多而停止。

然后我尝试运行sudo apt-get update && sudo apt-get upgrade但遇到了上面的错误。

几个月前,当我错误地从计算机中删除了 python2 时,我遇到了类似的问题。然后我无法通过单击图标(它没有响应)并关闭来关闭我的计算机。唯一的方法是强制它手动关闭。当我再次打开它时,我只有一个空桌面,什么也做不了。这是通过重新安装整个系统来解决的。

在互联网上搜索,我尝试了几个命令:

sudo dpkg --configure -a
Run Code Online (Sandbox Code Playgroud)

这导致

Setting up python3.3-minimal (3.3.1-1ubuntu5) ...
Traceback (most recent call last):
  File "/usr/lib/python3.3/py_compile.py", line 8, in <module>
    import imp
  File "/usr/lib/python3.3/imp.py", line 28, in <module>
       import tokenize
  File "/usr/lib/python3.3/tokenize.py", line 28, in <module>
    import re
  File "/usr/lib/python3.3/re.py", line 122, in <module>
    import sre_compile
      File "/usr/lib/python3.3/sre_compile.py", line 14, in <module>
    import sre_parse
  File "/usr/lib/python3.3/sre_parse.py", line 17, in <module>
    from sre_constants import *
  File "/usr/lib/python3.3/sre_constants.py", line 18, in <module>
    from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT
dpkg: error processing python3.3-minimal (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python3-minimal:
 python3-minimal depends on python3.3-minimal (>= 3.3.1-1~); however:
  Package python3.3-minimal is not configured yet.


sudo apt-get --reinstall install python3 python3-support
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package python3-support


sudo apt-get -f install 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up python3.3-minimal (3.3.1-1ubuntu5) ...
Traceback (most recent call last):
  File "/usr/lib/python3.3/py_compile.py", line 8, in <module>
    import imp
  File "/usr/lib/python3.3/imp.py", line 28, in <module>
    import tokenize
  File "/usr/lib/python3.3/tokenize.py", line 28, in <module>
    import re
  File "/usr/lib/python3.3/re.py", line 122, in <module>
    import sre_compile
  File "/usr/lib/python3.3/sre_compile.py", line 14, in <module>
    import sre_parse
  File "/usr/lib/python3.3/sre_parse.py", line 17, in <module>
    from sre_constants import *
  File "/usr/lib/python3.3/sre_constants.py", line 18, in <module>
    from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT
dpkg: error processing python3.3-minimal (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python3-minimal:
 python3-minimal depends on python3.3-minimal (>= 3.3.1-1~); however:
  Package python3.3-minimal is not configured yet.

dpkg: error processing python3-minimal (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3.3:
 python3.3 depends on python3.3-minimal (= 3.3.1-1ubuntu5); however:
  Package python3.3-minimal is not configured yet.

dpkg: error processing python3.3 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3.3 (>= 3.3.1-1~); however:
  Package python3.3 is not configured yet.
 python3 depends on python3-minimal (= 3.3.1-0ubuntu1); however:
  Package python3-minimal is not configured yet.

dpkg: error processing python3 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3.3-minimal
 python3-minimal
 python3.3
 python3
E: Sub-process /usr/bin/dpkg returned an error code (1)




dpkg: error processing python3-minimal (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3-minimal (= 3.3.1-0ubuntu1); however:
  Package python3-minimal is not configured yet.

dpkg: error processing python3 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3.3:
 python3.3 depends on python3.3-minimal (= 3.3.1-1ubuntu5); however:
  Package python3.3-minimal is not configured yet.

dpkg: error processing python3.3 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3.3-minimal
 python3-minimal
 python3
 python3.3


python --version
Run Code Online (Sandbox Code Playgroud)

返回 Python 2.7.4

正在做:

cd /tmp
sudo apt-get download python3
sudo dpkg -i python3*.deb && apt-get dist-upgrade
Run Code Online (Sandbox Code Playgroud)

返回

    (Reading database ... 374310 files and directories currently installed.)
Preparing to replace python3 3.3.1-0ubuntu1 (using python3_3.3.1-0ubuntu1_i386.deb) ...
running python pre-rtupdate hooks for python3.3...
Unpacking replacement python3 ...
dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3.3 (>= 3.3.1-1~); however:
  Package python3.3 is not configured yet.
 python3 depends on python3-minimal (= 3.3.1-0ubuntu1); however:
  Package python3-minimal is not configured yet.

dpkg: error processing python3 (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db ...
Errors were encountered while processing:
 python3
Run Code Online (Sandbox Code Playgroud)

我也尝试删除并重新安装python3

请问有什么帮助吗?

在 Gx1sptDTDa 的回答后编辑

sudo apt-get clean
sudo apt-get dist-upgrade 

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 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 python3.3-minimal (3.3.1-1ubuntu5) ...
Traceback (most recent call last):
  File "/usr/lib/python3.3/py_compile.py", line 8, in <module>
    import imp
  File "/usr/lib/python3.3/imp.py", line 28, in <module>
    import tokenize
  File "/usr/lib/python3.3/tokenize.py", line 28, in <module>
    import re
  File "/usr/lib/python3.3/re.py", line 122, in <module>
    import sre_compile
  File "/usr/lib/python3.3/sre_compile.py", line 14, in <module>
    import sre_parse
  File "/usr/lib/python3.3/sre_parse.py", line 17, in <module>
    from sre_constants import *
  File "/usr/lib/python3.3/sre_constants.py", line 18, in <module>
    from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT
dpkg: error processing python3.3-minimal (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python3-minimal:
 python3-minimal depends on python3.3-minimal (>= 3.3.1-1~); however:
  Package python3.3-minimal is not configured yet.

dpkg: error processing python3-minimal (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3.3:
 python3.3 depends on python3.3-minimal (= 3.3.1-1ubuntu5); however:
  Package python3.3-minimal is not configured yet.

dpkg: error processing python3.3 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3.3 (>= 3.3.1-1~); however:
  Package python3.3 is not configured yet.
 python3 depends on python3-minimal (= 3.3.1-0ubuntu1); however:
  Package python3-minimal is not configured yet.

dpkg: error processing python3 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3.3-minimal
 python3-minimal
 python3.3
 python3
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)

编辑:安装 python3.3-minimal 的所有依赖项

sudo apt-get install libc6 libexpat1 libpython3.3-minimal zlib1g
Run Code Online (Sandbox Code Playgroud)

返回

Reading package lists... Done
Building dependency tree       
Reading state information... Done
libc6 is already the newest version.
libexpat1 is already the newest version.
libpython3.3-minimal is already the newest version.
libpython3.3-minimal set to manually installed.
zlib1g is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 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 python3.3-minimal (3.3.1-1ubuntu5) ...
Traceback (most recent call last):
  File "/usr/lib/python3.3/py_compile.py", line 8, in <module>
    import imp
  File "/usr/lib/python3.3/imp.py", line 28, in <module>
    import tokenize
  File "/usr/lib/python3.3/tokenize.py", line 28, in <module>
    import re
  File "/usr/lib/python3.3/re.py", line 122, in <module>
    import sre_compile
  File "/usr/lib/python3.3/sre_compile.py", line 14, in <module>
    import sre_parse
  File "/usr/lib/python3.3/sre_parse.py", line 17, in <module>
    from sre_constants import *
   File "/usr/lib/python3.3/sre_constants.py", line 18, in <module>
     from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT
dpkg: error processing python3.3-minimal (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python3-minimal:
 python3-minimal depends on python3.3-minimal (>= 3.3.1-1~); however:
  Package python3.3-minimal is not configured yet.

dpkg: error processing python3-minimal (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3.3:
 python3.3 depends on python3.3-minimal (= 3.3.1-1ubuntu5); however:
  Package python3.3-minimal is not configured yet.

dpkg: error processing python3.3 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3.3 (>= 3.3.1-1~); however:
  Package python3.3 is not configured yet.
 python3 depends on python3-minimal (= 3.3.1-0ubuntu1); however:
  Package python3-minimal is not configured yet.

dpkg: error processing python3 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3.3-minimal
 python3-minimal
 python3.3
 python3
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)

编辑:sudo dbkg-reconfigure -a

1/ 问:?????????????????????????????? 添加用户 ??????????????????????????????????
? ?
? 默认情况下,用户的主目录对于 ?
? 系统。如果您想提高安全性和隐私性,您可能想要?
? 主目录只对其所有者可读。但如果有疑问, ?
? 启用此选项。?
? ?
? 这只会影响从现在开始添加的用户的主目录?
? adduser 命令。?
? ?
? 你想要系统范围内可读的主目录吗?

说是

2/ ? 配置apparmor ?????????????????????????????????
? 请为用户输入任何其他位置的空格分隔列表?
? 主目录。这些位置是在 ?
? /etc/apparmor.d/tunables/home 并且必须以“/”结尾。?
? ?
? 示例:如果用户的目录存储在 /srv/nfs/home 和 ?
? /mnt/homes,您应该输入“/srv/nfs/home/ /mnt/homes/”。?
? ?
? 其他主目录位置:

我不知道该指示什么位置... 所以我只是通过

最后,我在外壳上阅读:

update-rc.d: warning: /etc/init.d/acpi-support missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
acpid stop/waiting
acpid start/running, process 24816
 * Starting AppArmor  

profiles                                                              Skipping      
 profile in /etc/apparmor.d/disable: usr.bin.firefox
Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
                                                                     [ OK ]
 * Reloading AppArmor profiles                                                  
Skipping     profile in /etc/apparmor.d/disable: usr.bin.firefox
Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
                                                                     [ OK ]
gpg: key 437D05B5: "Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>" 
not     changed
gpg: key FBB75451: "Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com>" 
not     changed
gpg: key C0B21F32: "Ubuntu Archive Automatic Signing Key (2012)  
  <ftpmaster@ubuntu.com>"     not changed
gpg: key EFE21092: "Ubuntu CD Image Automatic Signing Key (2012) 
<cdimage@ubuntu.com>"     not changed
gpg: Total number processed: 4
gpg:              unchanged: 4
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Unknown media type in type 'uri/mms'
Unknown media type in type 'uri/mmst'
Unknown media type in type 'uri/mmsu'
Unknown media type in type 'uri/pnm'
Unknown media type in type 'uri/rtspt'
Unknown media type in type 'uri/rtspu'
/usr/sbin/dpkg-reconfigure: asymptote is broken or not fully installed
Run Code Online (Sandbox Code Playgroud)

编辑:Synaptic 在突触上,没有显示“损坏的依赖项”(我点击状态,我能看到的是:所有已安装已安装(本地或过时)已安装(手动)未安装未安装(剩余配置)

Gx1*_*TDa 2

编辑

该问题与以下错误报告有关:https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1165281

按照注释 #3 到 #5 中的步骤进行操作,但将路径更改为 python3.3 而不是 2.7。

  • 是的,它返回了 /usr/sbin/dpkg-reconfigure:python3.3-minimal 已损坏或未完全安装 (2认同)