在尝试sudo apt-get upgrade时随机获得了这个错误,并且已经尝试运行apt-get -f安装,但没有成功,我该怎么办?
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
libpython3.7-stdlib : Depends: libpython3.7-minimal (= 3.7.3-1+xenial1) but 3.7.3-2~16.04.york0 is installed
python3.7 : Depends: libpython3.7-stdlib (= 3.7.3-2~16.04.york0) but 3.7.3-1+xenial1 is installed
E: Unmet dependencies. Try using -f.编辑:
apt policy python3.7 libpython3.7-stdlib libpython3.7-minimal输出
python3.7:
Installed: 3.7.3-2~16.04.york0
Candidate: 3.7.3-2~16.04.york0
Version table:
*** 3.7.3-2~16.04.york0 500
500 http://ppa.launchpad.net/jonathonf/python-3.7/ubuntu xenial/main amd64 Packages
100 /var/lib/dpkg/status
3.7.3-1+xenial1 500
500 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial/main amd64 Packages
libpython3.7-stdlib:
Installed: 3.7.3-1+xenial1
Candidate: 3.7.3-2~16.04.york0
Version table:
3.7.3-2~16.04.york0 500
500 http://ppa.launchpad.net/jonathonf/python-3.7/ubuntu xenial/main amd64 Packages
*** 3.7.3-1+xenial1 500
500 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial/main amd64 Packages
100 /var/lib/dpkg/status
libpython3.7-minimal:
Installed: 3.7.3-2~16.04.york0
Candidate: 3.7.3-2~16.04.york0
Version table:
*** 3.7.3-2~16.04.york0 500
500 http://ppa.launchpad.net/jonathonf/python-3.7/ubuntu xenial/main amd64 Packages
100 /var/lib/dpkg/status
3.7.3-1+xenial1 500
500 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial/main amd64 Packagessudo apt install libpython3.7-stdlib输出
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
python3.7-distutils python3.7-lib2to3
Use 'sudo apt autoremove' to remove them.
The following packages will be upgraded:
libpython3.7-stdlib
1 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1748 kB of archives.
After this operation, 91,1 kB disk space will be freed.
(Reading database ... 303775 files and directories currently installed.)
Preparing to unpack .../libpython3.7-stdlib_3.7.3-2~16.04.york0_amd64.deb ...
Unpacking libpython3.7-stdlib:amd64 (3.7.3-2~16.04.york0) over (3.7.3-1+xenial1) ...
dpkg: error processing archive /var/cache/apt/archives/libpython3.7-stdlib_3.7.3-2~16.04.york0_amd64.deb (--unpack):
trying to overwrite '/usr/lib/python3.7/distutils/__init__.py', which is also in package python3.7-distutils 3.7.3-1+xenial1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libpython3.7-stdlib_3.7.3-2~16.04.york0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)发布于 2019-05-10 16:47:40
考虑删除有问题的PPA,然后用以下方法重新安装普通包:
sudo apt-get install ppa-purge
sudo ppa-purge ppa:jonathonf/python-3.7
sudo ppa-purge ppa:deadsnakes/ppa
sudo apt-get install --reinstall libpython3.5-minimal python3-minimal python3.5-minimal
sudo apt-get install --reinstall libpython3-stdlib libpython3.5-stdlib发布于 2019-05-09 23:16:27
好的,您似乎使用了另一个带有更高版本包的PPA,然后将它从您的sources.list中删除。这是不可能使易于降低整个软件包的版本。因此,您需要回过头来使用PPA:
sudo add-apt-repository ppa:jonathonf/python-3.7
sudo apt-get update
sudo apt-get upgradehttps://askubuntu.com/questions/1141955
复制相似问题