我的問題是我通過 ubuntus 更新程式進行了標準更新。現在每次我嘗試將 apt 用于任何事情時,都會引發以下錯誤:
sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libpython3.7-stdlib : Depends: libpython3.7-minimal (= 3.7.12-1 focal1) but 3.7.13-1 focal3 is installed
python3.7 : Depends: libpython3.7-stdlib (= 3.7.13-1 focal3) but 3.7.12-1 focal1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
到目前為止,我嘗試過:
sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... 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 additional packages will be installed:
libpython3.7-stdlib
The following packages will be upgraded:
libpython3.7-stdlib
1 upgraded, 0 newly installed, 0 to remove and 363 not upgraded.
1 not fully installed or removed.
Need to get 1.773 kB of archives.
After this operation, 90,1 kB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal/main amd64 libpython3.7-stdlib amd64 3.7.13-1 focal3 [1.773 kB]
Fetched 1.773 kB in 0s (4.827 kB/s)
(Reading database ... 329479 files and directories currently installed.)
Preparing to unpack .../libpython3.7-stdlib_3.7.13-1 focal3_amd64.deb ...
Unpacking libpython3.7-stdlib:amd64 (3.7.13-1 focal3) over (3.7.12-1 focal1) ...
dpkg: error processing archive /var/cache/apt/archives/libpython3.7-stdlib_3.7.1
3-1 focal3_amd64.deb (--unpack):
trying to overwrite '/usr/lib/python3.7/distutils/__init__.py', which is also i
n package python3.7-distutils 3.7.12-1 focal1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libpython3.7-stdlib_3.7.13-1 focal3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo apt-get autoremove --purge python3.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libpython3.7-stdlib : Depends: libpython3.7-minimal (= 3.7.12-1 focal1) but 3.7.13-1 focal3 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
并且基本上所有其他版本的 apt remove ,但沒??有占上風。
提前謝謝你們!
uj5u.com熱心網友回復:
我今天遇到了同樣的問題,對我來說這很有效:
在我們的例子中是:
sudo dpkg -P python3.7
sudo dpkg -P libpython3.7-stdlib
不能保證這是安全的或任何東西,它似乎對我有用。
希望它可以幫助您和其他遇到此問題的人。
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/474940.html
