解决错误apt --fix-broken install

文章讲述了用户在使用sudoapt-getinstallbuild-essential时遇到的依赖问题,提示安装的包由于第三方依赖未被安装。提供了解决方案:运行sudoapt--fix-brokeninstall修复依赖并安装缺失的包,以及提及离线安装时常出现此问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

遇到这个问题好几次了,每次都得重新搜索解决方案,索性记录一下吧。

问题:

用apt安装build-essential时,遇到以下报错:

$ sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version (12.8ubuntu1.1).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 autoconf : Depends: m4 (>= 1.4.13)
 automake : Depends: autotools-dev (>= 20020320.1) but it is not going to be installed
 bison : Depends: m4
 cmake-doc : Depends: libjs-sphinxdoc (>= 1.0) but it is not going to be installed
             Recommends: doc-base but it is not going to be installed
 flex : Depends: m4
        Recommends: libfl-dev but it is not going to be installed
 g++-multilib : Depends: g++-9-multilib (>= 9.3.0-3~) but it is not going to be installed
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值