Ubuntu 更新错误修复大全
在Ubuntu更新中,谁没有碰见个错误?在Ubuntu和其它基于Ubuntu的Linux发行版中,更新错误是一个共性的错误,也经常发生。这些错误出现的原因多种多样,修复起来也很简单。在本文中,我们将见到Ubuntu中各种类型频繁发生的更新错误以及它们的修复方法。
合并列表问题当你在终端中运行更新命令时,你可能会碰到这个错误“合并列表错误”,就像下面这样:
E:Encountered a section with no Package: header,
E:Problem with MergeList /var/lib/apt/lists/archive.ubuntu.comubuntudistspreciseuniversebinary-i386Packages,
E:The package lists or status file could not be parsed or opened.’
可以使用以下命令来修复该错误:
sudo rm -r /var/lib/apt/lists/* sudo apt-get clean sudo apt-get update 下载仓库信息失败 -1
实际上,有两种类型的下载仓库信息失败错误。如果你的错误是这样的:
W:Failed to fetch bzip2:/var/lib/apt/lists/partial/in.archive.ubuntu.comubuntudistsoneiricrestrictedbinary-i386Packages Hash Sum mismatch,
W:Failed to fetch bzip2:/var/lib/apt/lists/partial/in.archive.ubuntu.comubuntudistsoneiricmultiversebinary-i386Packages Hash Sum mismatch,
E:Some index files failed to download. They have been ignored, or old ones used instead
那么,你可以用以下命令修复:
sudo rm -rf /var/lib/apt/lists/* sudo apt-get update 下载仓库信息失败 -2
下载仓库信息失败的另外一种类型是由于PPA过时导致的。通常,当你运行更新管理器,并看到这样的错误时:
你可以运行sudo apt-get update来查看哪个PPA更新失败,你可以把它从源列表中删除。你可以按照这个截图指南来修复下载仓库信息失败错误。
下载包文件失败错误一个类似的错误是下载包文件失败错误,像这样:
该错误很容易修复,只需修改软件源为主服务器即可。转到“软件和更新”,在那里你可以修改下载服务器为主服务器:
在终端中运行更新会出现部分更新错误:
Not all updates can be installed
Run a partial upgrade, to install as many updates as possible
在终端中运行以下命令来修复该错误:
sudo apt-get install -f 加载共享库时发生错误
该错误更多是安装错误,而不是更新错误。如果尝试从源码安装程序,你可能会碰到这个错误:
error while loading shared libraries:
cannot open shared object file: No such file or directory
该错误可以通过在终端中运行以下命令来修复:
sudo /sbin/ldconfig -v
你可以在这里查找到更多详细内容加载共享库时发生错误。
无法获取锁 /var/cache/apt/archives/lock在另一个程序在使用APT时,会发生该错误。假定你正在Ubuntu软件中心安装某个东西,然后你又试着在终端中运行apt。
E: Could not get lock /var/cache/apt/archives/lock – open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/
通常,只要你把所有其它使用apt的程序关了,这个问题就会好的。但是,如果问题持续,可以使用以下命令:
sudo rm /var/lib/apt/lists/lock
如果上面的命令不起作用,可以试试这个命令:
sudo killall apt-get
关于该错误的更多信息,可以在这里找到。
GPG错误: 下列签名无法验证在添加一个PPA时,可能会导致以下错误GPG错误: 下列签名无法验证,这通常发生在终端中运行更新时:
W: GPG error: http://repo.mate-desktop.org saucy InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 68980A0EA10B4DE8
我们所要做的,就是获取系统中的这个公钥,从信息中获取密钥号。在上述信息中,密钥号为68980A0EA10B4DE8。该密钥可通过以下方式使用:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68980A0EA10B4DE8
在添加密钥后,再次运行更新就没有问题了。
BADSIG错误另外一个与签名相关的Ubuntu更新错误是BADSIG错误,它看起来像这样:
W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://extras.ubuntu.comprecise Release: The following signatures were invalid: BADSIG 16126D3A3E5C1192 Ubuntu Extras Archive Automatic Signing Key
W: GPG error: http://ppa.launchpad.net precise Release:
The following signatures were invalid: BADSIG 4C1CBC1B69B0E2F4 Launchpad PPA for Jonathan French W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/precise/Release
要修复该BADSIG错误,请在终端中使用以下命令:
sudo apt-get clean cd /var/lib/apt sudo mv lists oldlist sudo mkdir -p lists/partial sudo apt-get clean sudo apt-get update
本文汇集了你可能会碰到的Ubuntu更新错误,我希望这会对你处理这些错误有所帮助。你在Ubuntu中是否也碰到过其它更新错误呢?请在下面的评论中告诉我,我会试着写个快速指南。
原文发布时间为:2015-06-11
本文来自云栖社区合作伙伴“Linux中国”
Ubuntu文件系统损坏修复 前两天在使用Ubuntu14.04系统时,不知道何种原因桌面系统没有任何反应(ps:可能是开机运行的时间比较长吧),所以就对其进行了强制关机操作,可是悲剧的事情发生了,系统无法启动了,并且进入initramfs系统
相关文章
- Android 解决打包为apk文件时已设置签名,在OPPO手机上安装时却出现“未设置签名”的错误
- Flutter 错误 Transform‘s input file does not exist: ... artifacts/engine/android-arm/flutter.jar.
- Docker 在转发端口时的这个错误Error starting userland proxy: mkdir /port/tcp:0.0.0.0:3306:tcp:172.17.0.2:3306: input/output error.
- CBUUID UUIDString unrecognized selector sent to instance 错误
- HTTP 错误 401.2 - 未授权:服务器配置导致登录失败(已解决)
- 如何修复Ubuntu/Mint中无法添加PPA源的错误
- Ubuntu 14.04中修复“update information is outdated”错误
- 如何修复 ubuntu 中检测到系统程序错误的问题
- CSDN日报191113:Java 8 Optional 类错误使用的26个示例;Redis常见面试题(带答案)
- 解决Maven项目 Missing artifact jdk.tools:jdk.tools:1.7的错误
- 解决错误:org.springframework.jdbc.UncategorizedSQLException: Error attempting to get column ‘unique‘ fro
- 安装pycocotools错误
- 【Spring常见错误】Initialization failed for ‘https://start.spring.io‘
- 编译boost python模块遇到的错误:../../libraries/boost_1_44_0/boost/python/detail/wrap_python.hpp:75:24: fatal error: patchlevel.h: No such file or directory
- 微信公众号开发将war包导入新浪sae出现错误
- msql 2000 使用DBCC CHECK DB 得出错误,槽引用错误
- 将expression转化为数据类型int时发生算术溢出错误
- SQL SERVER错误号,SQL SERVER错误代码
- Ubuntu中建立ftp 503错误解决办法
- vs 2010 跳转到错误行代码的快捷键是什么啊
- kali无法执行默认网络浏览器输入/输出错误解决办法