参考:sudo apt-get update 错误 解决方法 - timkyle_zhang - 博客园
关于Ubuntu中Could not get lock /var/lib/dpkg/lock解决方案_jiangjiane-CSDN博客
说明:
sudo apt-get update
错误如下:
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.com precise Release: The following signatures were invalid: BADSIG 16126D3A3E5C1192 Ubuntu Extras Archive Automatic Signing Key <ftpmaster@ubuntu.com>
W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/precise/Release
W: 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
或者:
sudo rm /var/lib/dpkg/lock
sudo dpkg --configure -a
sudo apt update
E: 无法获得 /var/lib/apt/lists/partial/cn.archive.ubuntu.com_ubuntu_dists_xenial-backports_InRelease 的状态 - pkgAcqTransactionItem::TransactionState-stat (2: 没有那个文件或目录)
方法二(亲测可以用):
sudo rm /var/lib/apt/lists/lock
阅读量:628
点赞量:0
收藏量:0