在Ubuntu 16.04(LTS)中进行sudo aptget升级时出错

2024-04-18 20:21:53 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用这个命令来升级“sudo apt get upgrade”,并收到以下错误。我是Linux新手。。。 任何帮助都将不胜感激。。??在

这是终端的输出 $sudo apt升级

 Reading package lists... Done
 Building dependency tree       
 Reading state information... Done
 Calculating upgrade... Done
 The following packages will be upgraded: apport
 1 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
 34 not fully installed or removed.
 Need to get 0 B/120 kB of archives.
 After this operation, 0 B of additional disk space will be used.
 Do you want to continue? [Y/n] y
 (Reading database ... 565317 files and directories currently 
 installed.)
 Preparing to unpack .../apport_2.20.1-0ubuntu2.12_all.deb ...
 Traceback (most recent call last):
 File "/usr/bin/pyclean", line 24, in <module>
 import logging
 File "/usr/lib/python2.7/logging/__init__.py", line 26, in <module>
 import sys, os, time, cStringIO, traceback, warnings, weakref, 
 collections
 File "/usr/lib/python2.7/collections.py", line 9, in <module>
 from operator import itemgetter as _itemgetter, eq as _eq
 ImportError: /usr/lib/python2.7/lib-dynload/operator.so: undefined s 
 symbol: _PyUnicodeUCS4_AsDefaultEncodedString
 dpkg: warning: subprocess old pre-removal script returned error exit 
 status 1
 dpkg: trying script from the new package instead ...
 Traceback (most recent call last):
 File "/usr/bin/pyclean", line 24, in <module>
 import logging
 File "/usr/lib/python2.7/logging/__init__.py", line 26, in <module>
 import sys, os, time, cStringIO, traceback, warnings, weakref, 
 collections
 File "/usr/lib/python2.7/collections.py", line 9, in <module>
 from operator import itemgetter as _itemgetter, eq as _eq
 ImportError: /usr/lib/python2.7/lib-dynload/operator.so: undefined 
 symbol: _PyUnicodeUCS4_AsDefaultEncodedString
 dpkg: error processing archive /var/cache/apt/archives/apport_2.20.1-
 0ubuntu2.12_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
 Traceback (most recent call last):
 File "/usr/bin/pycompile", line 26, in <module>
 import logging
 File "/usr/lib/python2.7/logging/__init__.py", line 26, in <module>
 import sys, os, time, cStringIO, traceback, warnings, weakref, 
 collections
 File "/usr/lib/python2.7/collections.py", line 9, in <module>
 from operator import itemgetter as _itemgetter, eq as _eq
 ImportError: /usr/lib/python2.7/lib-dynload/operator.so: undefined   
 symbol: _PyUnicodeUCS4_AsDefaultEncodedString
 dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit 
 status 1
 Errors were encountered while processing:
 /var/cache/apt/archives/apport_2.20.1-0ubuntu2.12_all.deb
 E: Sub-process /usr/bin/dpkg returned an error code (1)

我怎样才能纠正这个问题呢。。?? 在“sudo apt get upgrade”之前执行“sudo apt get update”时也收到以下错误

^{pr2}$

Tags: toinpyimportlibusrloggingas
1条回答
网友
1楼 · 发布于 2024-04-18 20:21:53

你尝试过“更新”而不是“升级”吗?在

如果不是,请尝试sudo apt-get update,然后sudo apt-get upgrade

这将在升级之前更新可用包的列表。在

相关问题 更多 >