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?
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.Visit Stack Exchange
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
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.
$(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
( 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.