ubuntu apt 失败命令总结

本文详细介绍了在Ubuntu16.04LTS系统中遇到apt-get更新失败的问题及解决方案,包括如何处理锁冲突、解决依赖关系问题,并提供了图形界面下的解决方法。

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

Ubuntu 16.04 LTS:

apt-get update 失败处理 Aborted (core dumped)

使用命令:

sudo apt-get purge libappstream3
or
sudo apt-get remove libappstream3 

sudo apt-get update命令时出现如下错误:

 

E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)

Unable to lock directory /var/lib/apt/lists

使用命令:

sudo rm /var/lib/apt/lists/lock

出现apt 安装版本不兼容的情况:

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:
 apache2 : Depends: apache2-bin (= 2.4.18-2ubuntu3.4) but it is not going to be installed
           Depends: apache2-utils (>= 2.4)
           Depends: apache2-data (= 2.4.18-2ubuntu3.4) but it is not going to be installed
           Recommends: ssl-cert but it is not going to be installed
 linux-image-extra-4.4.0-51-generic : Depends: linux-image-4.4.0-51-generic but it is not going to be installed
 linux-image-extra-4.4.0-93-generic : Depends: linux-image-4.4.0-93-generic but it is not going to be installed
 linux-image-generic : Depends: linux-image-4.4.0-93-generic but it is not going to be installed
                       Recommends: thermald but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

可以通过图形界面打开system setting ==> software  & Update ==> 勾选Unsupported updates,使之支持不兼容的库。(不可用于工程)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值