3

Here is the error message:

E: Malformed entry 1 in list file /etc/apt/sources.list.d/ros-latest.list (Component)

This is what's written in my file:

deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main

What is wrong?

0

1 Answer 1

7

The correct entry for the file should look something like this:

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

where zesty should be replaced with the codename of your ubuntu release version.

The $(lsb_release -sc) is supposed to be a shell script command that would be expanded by the shell (e.g. bash) when you type something like this in the terminal:

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

The shell command above are supposed to call the lsb_release command to figure out the correct ubuntu codename (e.g. zesty for 17.04, yakkety for 16.10, xenial for 16.04). The output of lsb_release which should be the ubuntu release codename would then be interpolated into the string between the quotes and then written to the file /etc/apt/sources.list.d/ros-latest.list.

However, you must have put an extra space between $ and ( when typing the command, which causes the $ (lsb_release -sc) to be written literally, instead of having the output of the lsb_release command interpolated into the config file.

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.