You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 18.04.6 LTS下执行sudo apt --fix-broken install失败,无法安装软件的求助

Ubuntu 18.04.6 LTS下执行sudo apt --fix-broken install失败,无法安装软件的求助

我目前运行的是Ubuntu 18.04.6 LTS系统,现在遇到了一个棘手的问题——完全没法用sudo apt install安装任何软件,每次执行都会报错,具体错误信息如下:

[sudo] password for username:

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.9 : Depends: libpython3.9-stdlib (= 3.9.15-1+bionic1) but 3.9.5-1+bionic1 is to be installed

libpython3.9-dev : Depends: libpython3.9-stdlib (= 3.9.15-1+bionic1) but 3.9.5-1+bionic1 is to be installed

python3.9 : Depends: libpython3.9-stdlib (= 3.9.15-1+bionic1) but 3.9.5-1+bionic1 is to be installed

python3.9-minimal : Depends: libpython3.9-minimal (= 3.9.15-1+bionic1) but 3.9.5-1+bionic1 is to be installed

E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

按照提示,我尝试执行了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:

libllvm7 libllvm9 linux-headers-5.4.0-73-generic linux-hwe-5.4-headers-5.4.0-73 linux-image-5.4.0-73-generic

linux-modules-5.4.0-73-generic linux-modules-extra-5.4.0-73-generic

Use 'sudo apt autoremove' to remove them.

The following additional packages will be installed:

libpython3.9-minimal libpython3.9-stdlib

The following packages will be upgraded:

libpython3.9-minimal libpython3.9-stdlib

2 to upgrade, 0 to newly install, 0 to remove and 152 not to upgrade.

6 not fully installed or removed.

Need to get 0 B/2,486 kB of archives.

After this operation, 73.7 kB of additional disk space will be used.

Do you want to continue? [Y/n] y

(Reading database ... 214069 files and directories currently installed.)

Preparing to unpack .../libpython3.9-stdlib_3.9.16-1+bionic1_amd64.deb ...

Unpacking libpython3.9-stdlib:amd64 (3.9.16-1+bionic1) over (3.9.5-1+bionic1) ...

dpkg: error processing archive /var/cache/apt/archives/libpython3.9-stdlib_3.9.16-1+bionic1_amd64.deb (--unpack):

trying to overwrite '/usr/lib/python3.9/_sysconfigdata__linux_x86_64-linux-gnu.py', which is also in package libpython3.9-minimal:amd64 3.9.5-1+bionic1

Preparing to unpack .../libpython3.9-minimal_3.9.16-1+bionic1_amd64.deb ...

Unpacking libpython3.9-minimal:amd64 (3.9.16-1+bionic1) over (3.9.5-1+bionic1) ...

dpkg: error processing archive /var/cache/apt/archives/libpython3.9-minimal_3.9.16-1+bionic1_amd64.deb (--unpack):

trying to overwrite '/usr/lib/python3.9/typing.py', which is also in package libpython3.9-stdlib:amd64 3.9.5-1+bionic1

dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)

Errors were encountered while processing:

/var/cache/apt/archives/libpython3.9-stdlib_3.9.16-1+bionic1_amd64.deb

/var/cache/apt/archives/libpython3.9-minimal_3.9.16-1+bionic1_amd64.deb

E: Sub-process /usr/bin/dpkg returned an error code (1)

除此之外,我还试过系统自带的“Software Updater”,它同样报错,建议我执行sudo apt-get install -f,但运行这个命令后还是出现了和上面一样的“Broken pipe”错误。

现在我好像陷入了死循环,试了各种方法都没法解决,有没有大佬能给我点下一步的建议?

备注:内容来源于stack exchange,提问作者ChrisBon

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.23 09:09:10