我仍然能够运行Anaconda,但是Python安装在意外地创建了一个错误的符号链接并试图升级Python版本之后遇到了一些问题。
The following additional packages will be installed:
apport apport-gtk aptdaemon python3-apport python3-apt python3-aptdaemon python3-aptdaemon.gtk3widgets python3-distupgrade python3-software-properties python3-update-manager ubuntu-drivers-common ubuntu-release-upgrader-core ubuntu-release-upgrader-gtk unattended-upgrades update-manager-core update-notifier update-notifier-common
Suggested packages:
x-terminal-emulator python3-launchpadlib python3-apt-dbg python-apt-doc python3-aptdaemon.pkcompat bsd-mailx default-mta | mail-transport-agent needrestart
The following NEW packages will be installed:
apport apport-gtk aptdaemon python3-apport python3-apt python3-aptdaemon python3-aptdaemon.gtk3widgets python3-distupgrade python3-software-properties python3-update-manager ubuntu-release-upgrader-core ubuntu-release-upgrader-gtk unattended-upgrades update-manager-core update-notifier update-notifier-common The following packages will be upgraded: ubuntu-drivers-common..。
Preparing to unpack .../00-python3-apt_1.6.5ubuntu0.5_amd64.deb ...
Unpacking python3-apt (1.6.5ubuntu0.5) ...
Preparing to unpack .../01-ubuntu-drivers-common_1%3a0.8.6.3~0.18.04.1_amd64.deb ...
File "/usr/bin/py3clean", line 4
SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3clean on line 4, but no encoding declared;
see http://python.org/dev/peps/pep-0263/ for details
dpkg: error processing archive /tmp/apt-dpkg-install-UU4SRN/01-ubuntu-drivers-common_1%3a0.8.6.3~0.18.04.1_amd64.deb (--unpack):
new ubuntu-drivers-common package pre-removal script subprocess returned error exit status 1
File "/usr/bin/py3compile", line 4
SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3compile on line 4, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
dpkg: error while cleaning up:
installed ubuntu-drivers-common package post-installation script subprocess returned error exit status 1..。
Errors were encountered while processing:
/tmp/apt-dpkg-install-UU4SRN/01-ubuntu-drivers-common_1%3a0.8.6.3~0.18.04.1_amd64.deb既不能运行sudo dpkg --configure -a也不能运行sudo apt-get install -f
发布于 2021-04-28 06:35:14
你的帖子在细节上有点薄弱(你到底做了些什么?)为什么要在描述中包括蟒蛇?但是,手动升级整个系统范围的python安装是个坏主意,因为许多系统实用程序依赖于正确的python版本。我强烈建议您恢复您的更改,如果需要更新的python版本,请构建一个python虚拟环境。。
尽管如此,我看到的唯一问题是,由于安装脚本中有一个意想不到的字符,无法安装单个包(01-ubuntu-drivers-common_1%3a0.8.6.3~0.18.04.1_amd64.deb)。我们确定这取决于python的升级吗?如果是,为什么?
请恢复您的python升级,然后重试。
https://serverfault.com/questions/1061800
复制相似问题