ubuntu apt-get 出现NO_PUBKEY的解决方案
标签: ubuntu
- 该话题包含 2个回复,2 人参与,最后由Frank Chen 更新于 1年、 7月前 。
正在查看 2 条回复
- 作者帖子
- Up::10
sudo apt-get update
报错如下:
The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY F42ED6FBAB17C654 Fetched 4,678 B in 2s (1,902 B/s) Reading package lists… Done W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://packages.ros.org/ros/ubuntu xenial InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY F42ED6FBAB17C654 W: Failed to fetch http://packages.ros.org/ros/ubuntu/dists/xenial/InRelease The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY F42ED6FBAB17C654 W: Some index files failed to download. They have been ignored, or old ones used instead.
解决方案:
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys xxx %xxx替换成报错的F42ED6FBAB17C654 apt-key adv --[两短横]recv-keys --[两短横]keyserver keyserver.ubuntu.com xxx
再进行sudo apt-get update发现问题解决
- Up::0
解决apt-get /var/lib/dpkg/lock-frontend 问题
sudo rm /var/lib/dpkg/lock-frontend sudo rm /var/lib/dpkg/lock sudo rm /var/cache/apt/archives/lock
- Up::1
如果出现如下的错误,也是一样的解决办法
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 10162 (unattended-upgr) E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/
- 作者帖子
正在查看 2 条回复
- 哎呀,回复话题必需登录。