在学习ros、slam的同时,不要被ubuntu出现的各种bug而消耗太多时间:
比如ubuntu系统更新、还源,有可能你找了网上的教程换了源,最后还是没有sudo apt-get update起来
1.制定好学习计划,把更多的时间放在理论、代码等消化环节
2.ubuntu由于是开源,内核、显卡、声卡、驱动、各种配置,当你遇到相关问题的时候,你去谷歌或者去百度,可能有人和你遇到了相同的问题,哪怕遇到相同的问题,因为不同ubunut版本、对方PC的硬件情况、软件配置情况与你不同。同一个bug可能会有多个答案,你可能尝试了许多个,都无法解决你的问题,这时候:如果不是大问题,不要花你太多时间,放到以后去解决(初学者非常容易遇到一个ubuntu问题,搞一天,搞几天。然后就放弃学习了),这部分涉及到时间管理的问题。
3.提高问题检索能力:
报错不可怕,可怕的是胡乱找错误,一般运行某个命令,出错,先找第一个erro然后按顺序去检索,看看能不能解决。
今天我sudo apt-get update
遇到了一个
Hit:1 http://packages.microsoft.com/repos/code stable InRelease Ign:2 http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu bionic InRelease Ign:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease Hit:4 http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu bionic Release Hit:5 http://dl.google.com/linux/chrome/deb stable InRelease Ign:6 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease Ign:8 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease Ign:9 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease Err:10 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic Release Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate. Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443] Err:11 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates Release Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate. Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443] Hit:12 http://archive.ubuntu.com/ubuntu bionic InRelease Hit:13 http://ppa.launchpad.net/videolan/master-daily/ubuntu bionic InRelease Err:14 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports Release Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate. Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443] Err:15 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security Release Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate. Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443] Reading package lists... Done E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.
我百度repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic Release' no longer has a Release file.
有教程: 默认的源是http的,但替换用的镜像源是https,所以休要额外的安装关于HTTPS的包。 apt install apt-transport-https apt install ca-certificates apt update
但是我试试了没有用,
然后百度Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate. Could not handshake: Error in the certificate verification.
有答案说:
各种更新证书的方式也试了,没有一个有效。 最后发现是 机器时间设置 问题,因为证书校验是 时间敏感的。 而我的机器时间还停留在去年。 搜到了 stackoverflow.com/questions/2… 这里,才看到了 答案: Another cause of this problem might be that your clock might be off. Certificates are time sensitive. To check the current system time: date -R You might consider installing NTP to automatically sync the system time with trusted internet timeservers from the global NTP pool. For example, to install on Debian/Ubuntu: apt-get install ntp apt-get install ntp
我试了发现没有用,然后发现有人说是缺少ca-certificates包
重装什么的试试也没有用,
最后还是检索Certificate verification failed: The certificate is NOT trusted
:把软件源里的https改成http就行了