-1

while installing ros i get the error

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

karel
  • 110,292
  • 102
  • 269
  • 299
  • Could you [edit] your question to include the contents of `ros-latest.list`? This will make it easier to see why there is a "malformed entry" error. – matigo Feb 03 '22 at 08:03
  • 2
    Does this answer your question? [How do I remove a malformed line from my sources.list?](https://askubuntu.com/questions/78951/how-do-i-remove-a-malformed-line-from-my-sources-list) – guiverc Feb 03 '22 at 08:12
  • There was no Ubuntu release in 2018-May (ie. 18.05). Major releases are *year.month* in format, with some *specialist* releases using the *year* format; your 18.05 is likely a typo, but ensure you're actually using Ubuntu as there was no May release in 2018. – guiverc Feb 03 '22 at 08:14
  • 1
    Does this answer your question? [E: Malformed entry 54 in list file /etc/apt/sources.list (Component)](https://askubuntu.com/questions/766669/e-malformed-entry-54-in-list-file-etc-apt-sources-list-component) – karel Feb 23 '22 at 07:00

1 Answers1

1

Running the following command will fix this issue:

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

Here is a bug report for the same.

Error404
  • 6,920
  • 1
  • 26
  • 50