Ask Your Question
0

How do I add a repository Ubuntu Bionic

asked 2019-05-15 19:15:14 -0500

jrock gravatar image

My output of

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

is

deb http:packages.ros.org/ros/ubuntu main

So I want to replace this as its missing the distribution name.

Searching at https://repogen.simplylinux.ch/generate.php I am shown the following:

###### Ubuntu Main Repos
deb http://us.archive.ubuntu.com/ubuntu/  main 
deb-src http://us.archive.ubuntu.com/ubuntu/  main 

###### Ubuntu Update Repos
deb http://us.archive.ubuntu.com/ubuntu/ -security main 
deb-src http://us.archive.ubuntu.com/ubuntu/ -security main

My question is: How do I replace my malformed repository with the one I found at the repogen website?

Thank you

edit retag flag offensive close merge delete

Comments

Is

deb http:packages.ros.org/ros/ubuntu main

a typo? It seems to be missing the // between http: and packages.ros.org/...

gvdhoorn gravatar imagegvdhoorn ( 2019-05-16 02:12:01 -0500 )edit

How do I replace my malformed repository with the one I found at the repogen website?

I wouldn 't use repogen for this: it seems to be slightly out-of-date (only lists Bionic (alpha 2)), it doesn't help you configure the ROS repositories and seems to be more geared towards setting up the main sources.list. For ROS you'd use an add-on file (ros-latest.list) which is not part of sources.list, but placed in /etc/apt/sources.list.d/ (which is a directory, not a file).

gvdhoorn gravatar imagegvdhoorn ( 2019-05-16 02:54:03 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-05-16 02:11:18 -0500

gvdhoorn gravatar image

updated 2019-05-16 02:58:04 -0500

It's just a text file, so you can edit it using nano, vim, joe, gedit, anything. You will need to use sudo though, as it's a file in a non-world-writable location (ie: only root may change it).

On my system (ROS Melodic on Ubuntu Bionic) ros-latest.list contains:

deb http://packages.ros.org/ros/ubuntu bionic main

Note the bionic between http://packages.ros.org/ros/ubuntu and main.

The following command will write this line to the ros-latest.list file:

echo "deb http://packages.ros.org/ros/ubuntu bionic main" | sudo tee /etc/ros/rosdep/sources.list.d/ros-latest.list
edit flag offensive delete link more

Comments

Excellent. Thank you. This worked.

jrock gravatar imagejrock ( 2019-05-17 23:38:42 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-05-15 19:15:14 -0500

Seen: 31 times

Last updated: May 16