![升级后依赖关系中断](https://linux22.com/image/838808/%E5%8D%87%E7%BA%A7%E5%90%8E%E4%BE%9D%E8%B5%96%E5%85%B3%E7%B3%BB%E4%B8%AD%E6%96%AD.png)
之后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)
我无法关掉我的电脑……
我猜我没有正确安装 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
我以前用的是 ubuntu 12.10。当我尝试将其升级到 13.04 时出现了问题。我收到一条错误消息,告诉我由于错误太多,该过程已停止。
然后我尝试运行sudo apt-get update && sudo apt-get upgrade
但遇到上述错误。
几个月前,我遇到过类似的问题,当时我错误地从电脑中删除了 python2。然后我无法通过单击图标(它没有响应)关闭电脑。唯一的方法是强制手动关闭它。当我再次打开它时,我只有一个空桌面,无法执行任何操作。通过重新安装整个系统解决了这个问题。
在网上搜索后,我尝试了几个命令:
sudo dpkg --configure -a
导致
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
返回 Python 2.7.4
正在做:
cd /tmp
sudo apt-get download python3
sudo dpkg -i python3*.deb && apt-get dist-upgrade
返回
(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
我也尝试删除并重新安装 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)
编辑:安装 python3.3-minimal 的所有依赖项
sudo apt-get install libc6 libexpat1 libpython3.3-minimal zlib1g
返回
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)
编辑:sudo dbkg-reconfigure -a
1/ 询问:──────────────────────────────┤ Adduser ═────────────────────────────────┐
│ │
│ 默认情况下,用户的主目录可由系统上的所有用户读取
。如果您想提高安全性和隐私性,您可能希望
主目录仅对其所有者可读。但如果有疑问,
请保持此选项启用。│
│ │
│ 这只会影响从现在开始使用
adduser 命令添加的用户的主目录。│
│ │
│ 您想要系统范围可读的主目录吗?
答应了
2/ ┤ 配置 apparmor ═──────────────────────────┐
│ 请用空格分隔用户主目录的任何其他位置列表
。这些位置是 /etc/apparmor.d/tunables/home 中指定位置的补充
,并且必须以“/”结尾。│
│ │
│ 例如:如果用户的目录存储在 /srv/nfs/home 和
/mnt/homes 中,则应输入“/srv/nfs/home/ /mnt/homes/”。│ │
│
│ 其他主目录位置:
我不知道该指示什么位置... 所以我就通过
最后我在shell上读到:
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 <[email protected]>"
not changed
gpg: key FBB75451: "Ubuntu CD Image Automatic Signing Key <[email protected]>"
not changed
gpg: key C0B21F32: "Ubuntu Archive Automatic Signing Key (2012)
<[email protected]>" not changed
gpg: key EFE21092: "Ubuntu CD Image Automatic Signing Key (2012)
<[email protected]>" 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
编辑:突触 在突触上,没有显示“破坏的依赖关系”(我点击状态,我所能看到的是:全部安装已安装(本地或过时)已安装(手动)未安装未安装(残留配置)
答案1
编辑
该问题与以下错误报告有关:https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1165281
按照注释#3 至#5 中的步骤进行操作,但将路径更改为 python3.3 而不是 2.7。
答案2
我在使用另一个软件包 libamd2.3.1:amd64 时遇到了同样的问题。我收到以下错误:
> sudo apt upgrade
[...]
Errors were encountered while processing:
libamd2.3.1:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
下列的这线程,我设法用 dpkg 将其删除并用 apt 重新安装。
sudo dpkg --remove --force-remove-reinstreq libamd2.3.1:amd64
sudo apt-get install libamd2.3.1:amd64