Robotics StackExchange | Archived questions

Cannot set sources.list.d/ros-latest.list

follow the melodic installation guide key in the code

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

my computer shows illegal option

I am sure these 3 repositories "restricted," "universe," and "multiverse" are allowed. but I got "failed to download repositories information" when I tried to download it I changed different server but the result is the same.

I got the message my RAM may not be large enough. is this the reason ?


Edit:

Ign:1 http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial InRelease
Ign:2 http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial-updates InRelease
Ign:3 http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial-backports InRelease
Ign:4 http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial-security InRelease
Err:5 http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial Release
  404  Not Found
Err:6 http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial-updates Release
  404  Not Found
Err:7 http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial-backports Release
  404  Not Found
Err:8 http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial-security Release
  404  Not Found
Get:9 http://packages.ros.org/ros/ubuntu xenial InRelease [4678 B]
Err:9 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
Reading package lists... Done
E: The repository 'http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial 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.
E: The repository 'http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial-updates 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.
E: The repository 'http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial-backports 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.
E: The repository 'http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial-security 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: 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

I removed the old key and key in the new key the screen shows

sudo -E apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
Executing: /tmp/tmp.VhsX2dbmna/gpg.1.sh --keyserver
hkp://keyserver.ubuntu.com:80
--recv-key
C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
gpg: requesting key AB17C654 from hkp server keyserver.ubuntu.com
gpg: key AB17C654: public key "Open Robotics <info@osrfoundation.org>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

and try sudo apt update it still not works:

Ign:1 http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial InRelease
Ign:2 http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial-updates InRelease
Ign:3 http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial-backports InRelease
Ign:4 http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial-security InRelease
Err:5 http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial Release
  404  Not Found
Err:6 http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial-updates Release
  404  Not Found
Err:7 http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial-backports Release
  404  Not Found
Err:8 http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial-security Release
  404  Not Found
Get:9 http://packages.ros.org/ros/ubuntu xenial InRelease [4678 B]
Get:10 http://packages.ros.org/ros/ubuntu xenial/main amd64 Packages [786 kB]
Get:11 http://packages.ros.org/ros/ubuntu xenial/main i386 Packages [563 kB]
Reading package lists... Done     
E: The repository 'http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial 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.
E: The repository 'http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial-updates 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.
E: The repository 'http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial-backports 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.
E: The repository 'http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial-security 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.

Asked by Afra on 2019-06-14 03:30:56 UTC

Comments

Could you please copy-paste the error message verbatim?

Asked by gvdhoorn on 2019-06-14 03:45:54 UTC

I don't have any points now :( the error message :sh: 0: Illegal option -

Asked by Afra on 2019-06-14 08:02:32 UTC

You don't need any points, as we don't ask you for a screenshot, but a copy-paste of the text of the error message.

Asked by gvdhoorn on 2019-06-14 10:56:03 UTC

Can you try the following command:

echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/ros-latest.list

and afterwards show us the output of

cat /etc/apt/sources.list.d/ros-latest.list

just copy-paste the output of the last command (and any errors you get from the first) into your question.

Use the edit button/link for that.

Asked by gvdhoorn on 2019-06-14 10:57:38 UTC

After I key in the command:echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/ros-latest.list the result is deb http://packages.ros.org/ros/ubuntu xenial main

Asked by Afra on 2019-06-14 18:11:58 UTC

Ok.

That is good.

Now try a sudo apt update, and show us the output here.

Asked by gvdhoorn on 2019-06-15 00:50:55 UTC

Please do not post updates here as comments. To show us console text, append it to your original question. Use the edit button/link for that.

Asked by gvdhoorn on 2019-06-15 03:19:18 UTC

I'm confused by your last edit. Did you intend to show us an update?

Asked by gvdhoorn on 2019-06-15 08:54:57 UTC

Answers

I'm not entirely sure what the problem with the ftp.nsysu.edu.tw host is, but at least for packages.ros.org you don't appear to have the correct key imported.

Refer to #q325039 for instructions on how to fix that.

Then run a sudo apt update again.


Edit:

and try sudo apt update it still not works:

E: The repository 'http://ftp.nsysu.edu.tw/Ubuntu/ubuntu xenial 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.

This is not a problem with the ROS package repositories, but with the ftp.nsysu.edu.tw host.

Do you know what ftp.nsysu.edu.tw is? Try using a different host.

In any case: the problem with the ROS package repositories seems to be fixed: you now have the correct key imported.

Asked by gvdhoorn on 2019-06-15 03:18:44 UTC

Comments