1

I'm trying to install ROS and can't because:

E: Malformed entry 1 in list file /etc/apt/sources.list.d/ros-latest.list (Suite)
E: The list of sources could not be read.

What do I do?

History:

 1  sudo apt update
 2  sudo apt upgrade
 3  sudo apt update
 4  sudo apt install bpython
 5  bpython
 6  sudo apt install x11-apps
 7  xeyes &
 8  xcalc
 9  sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
10  sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu
11  (lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
12  sudo apt install curl # if you haven't already installed curl
13  sudo apt install curl
14  sudo apt update
15  sudo apt install ros-melodic-desktop-full
16  cat /etc/apt/sources.list.d/ros-latest.list
17  sudo add-apt-repository universe
18  sudo add-apt-repository multiverse
19  sudo apt update
20  sudo add-apt-repository universe
21  /etc/apt/sources.list.d/ros-latest.list
22  history

Request 1:

cat /etc/apt/sources.list.d/ros-latest.list
deb http://packages.ros.org/ros/ubuntu
(lsb_release -sc) main
  • Which version of Ubuntu are you running? What is inside the file /etc/apt/sources.list.d/ros-latest.list? Add these information inside the question. List all the steps you did to install ROS by copying and pasting the history of commands from the terminal into the question. Indicate at which step you get this error. – user68186 May 09 '23 at 14:55
  • Ubuntu 18.04 LTS – Margarida May 09 '23 at 15:06
  • $ /etc/apt/sources.list.d/ros-latest.list -bash: /etc/apt/sources.list.d/ros-latest.list: Permission denied – Margarida May 09 '23 at 15:10
  • Enter cat /etc/apt/sources.list.d/ros-latest.list and add the output in your question. Format the pasted output as code by using the {_} icon above the edit window. – user68186 May 09 '23 at 15:33
  • Oh, no! I'm going to have to do this again?? Thank you, for the information. – Margarida May 09 '23 at 21:25

1 Answers1

2

These lines in the .list file

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

should be one line like this

deb http://packages.ros.org/ros/ubuntu bionic main
Organic Marble
  • 23,641
  • 15
  • 70
  • 122