一、问题重述
ubuntu 执行 sudo apt-get install ****
的时候,报这样的警告 WARNING: The following packages cannot be authenticated!
,导致后面安装失败。
自己是在执行 sudo apt-get install ros-kinetic-jsk-topic-tools
的时候,出现这样的错误,导致出现
wong@WONG ~$ sudo apt-get install ros-kinetic-jsk-topic-tools ros-kinetic-jsk-recognition-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libqtassistantclient4 python-decorator python-opencv python-qt4 python-scipy python-skimage python-skimage-lib
Suggested packages:
python-qt4-dbg python-scipy-doc python-skimage-doc
The following NEW packages will be installed:
libqtassistantclient4 python-decorator python-opencv python-qt4 python-scipy python-skimage python-skimage-lib ros-kinetic-jsk-recognition-utils ros-kinetic-jsk-topic-tools
0 upgraded, 9 newly installed, 0 to remove and 220 not upgraded.
Need to get 287 kB/25.4 MB of archives.
After this operation, 82.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
ros-kinetic-jsk-topic-tools
Install these packages without verification? [y/N] y
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
二、解决方法
主要的原因可能是 /var/lib/apt/lists/*_Release.gpg files 崩溃,将其删除,然后再执行 sudo apt-get update
依次执行以下指令
sudo rm -frv /var/lib/apt/lists
sudo mkdir -pv /var/lib/lists/partial
sudo apt-get update
sudo apt-key update
然后再次执行 sudo apt-get install ****
就可以安装成功了~~~~~
参考链接:
[1] WARNING: The following packages cannot be authenticated! : https://blog.csdn.net/chengyq116/article/details/101049631