Python 在Ubuntu 16.04(LTS)中执行sudo apt get升级时出错
我已使用此命令升级“sudo apt get upgrade”,并收到以下错误。我是Linux新手。。。 任何帮助都将不胜感激 这是终端的输出 $sudo可升级Python 在Ubuntu 16.04(LTS)中执行sudo apt get升级时出错,python,linux,ubuntu-16.04,Python,Linux,Ubuntu 16.04,我已使用此命令升级“sudo apt get upgrade”,并收到以下错误。我是Linux新手。。。 任何帮助都将不胜感激 这是终端的输出 $sudo可升级 Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages will be upgraded:
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)
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.
您是否尝试过“更新”或“升级” 如果没有,请尝试
sudo-apt-get-update
然后sudo-apt-get-upgrade
这将在升级前更新可用软件包列表。非常感谢您的回复。我在升级前更新时收到此错误。N:来自此类存储库的数据无法进行身份验证,因此使用可能存在危险。N:有关存储库创建和用户配置的详细信息,请参阅apt secure(8)手册页。E:未能获取404未找到E:某些索引文件未能下载。它们已被忽略,或者使用了旧的。@IshuChandrakumar:Error明确表示请求的包不可用!!!。您应该尝试显式安装它们。是的,我仍然坚持我的答案,“sudo-apt-get-update”然后“sudo-apt-get-upgrade”才是正确的选择!