在Ubuntu 16.04(LTS)中进行sudo apt-get升级时出错

时间:2017-11-17 11:25:05

标签: python linux ubuntu-16.04

我已使用此命令升级" sudo apt-get upgrade"我收到了以下错误。我是Linux新手...... 任何帮助将不胜感激.. ??

这是终端的输出 $ sudo apt-get upgrade

 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)

我怎样才能纠正这个问题.. ?? 执行&#34; sudo apt-get update&#34;之前&#34; sudo apt-get upgrade&#34;

   W: The repository 'http://ppa.launchpad.net/fkrull/deadsnakes -
   python2.7/ubuntu xenial Release' does not have a Release file.
   N: Data from such a repository can't be authenticated and is 
   therefore potentially dangerous to use.
   N: See apt-secure(8) manpage for repository creation and user 
   configuration details.
   E: Failed to fetch http://ppa.launchpad.net/fkrull/deadsnakes  -
   python2.7/ubuntu/dists/xenial/main/binary-amd64/Packages  404  Not 
   Found
   E: Some index files failed to download. They have been ignored, or 
   old ones used instead.

1 个答案:

答案 0 :(得分:-1)

您是否尝试'更新'生成'升级'?

如果没有,请尝试sudo apt-get update然后sudo apt-get upgrade

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