我看到过一些类似的问题,但在我的情况下,当我运行sudo apt-get update
时弹出以下错误:
ICON_lab) randychen@randychen-Delta-15-A5EFK:~/projects$ sudo apt-get update
Hit:1 http://us.archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://us.archive.ubuntu.com/ubuntu jammy-updates InRelease [114 kB]
Ign:3 http://packages.ros.org/ros/ubuntu jammy InRelease
Err:4 http://packages.ros.org/ros/ubuntu jammy Release
404 Not Found [IP: 140.211.166.134 80]
Get:5 http://us.archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB]
Get:6 http://www.deb-multimedia.org jessie InRelease [15.4 kB]
Hit:7 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:8 http://security.ubuntu.com/ubuntu jammy-security InRelease
Get:9 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 DEP-11 Metadata [95.1 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 DEP-11 Metadata [257 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 DEP-11 Metadata [940 B]
Get:13 http://us.archive.ubuntu.com/ubuntu jammy-backports/universe amd64 DEP-11 Metadata [11.4 kB]
Ign:6 http://www.deb-multimedia.org jessie InRelease
Hit:12 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Reading package lists... Done
E: The repository 'http://packages.ros.org/ros/ubuntu jammy Release' does not have 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.
W: GPG error: http://www.deb-multimedia.org jessie InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5C808C2B65558117
E: Release file for http://www.deb-multimedia.org/dists/jessie/InRelease is expired (invalid since 388d 20h 52min 20s). Updates for this repository will not be applied.
W: https://packagecloud.io/slacktechnologies/slack/debian/dists/jessie/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
一开始我以为这是由于PPA,但我这里没有PPA。我试着按照这篇文章来解决问题,我在文件的顶部添加了那行代码,但它也不起作用。
任何帮助都非常感谢!
你必须更正url:
sudo grep -rlF 'http://packages.ros.org' /etc/apt/sources* |
xargs sed -i 's@http://packages.ros.org@https://ubuntu.osuosl.org/@'
sudo apt update