Ask Your Question
1

apt update: "Malformed entry 1 in list file"

asked 2018-12-27 14:22:06 -0500

Keshav gravatar image

updated 2018-12-28 08:56:44 -0500

gvdhoorn gravatar image

I am using command sudo apt-get update and this error is coming. How to solve this issue?

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

I am using ubuntu 18.04 and ros melodic.

ros-latest.list content:-

deb http://packages.ros.org/ros/ubuntu  main
edit retag flag offensive close merge delete

Comments

1

What is your question? I don't see any question, just an error or warning without any context. Please see the support page for how to ask a question.

jayess gravatar imagejayess ( 2018-12-28 03:03:27 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2018-12-28 05:26:40 -0500

gvdhoorn gravatar image

updated 2018-12-28 09:15:17 -0500

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

Something probably went wrong during initial setup of the ROS package repository sources. Most likely this section of the tutorial.

Can you show us the contents of ros-latest.list? Use the following command:

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

and copy-paste the text from the terminal into your original question text. Use the edit button/link for that.


Edit:

ros-latest.list content:-

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

I have the impression that this is missing the Ubuntu code name for the release, which in your case probably should be bionic (provided you are actually running Ubuntu Bionic (ie: 18.04).

To make sure: what is the output of:

lsb_release -sc

If that returns an error, or tells you the command lsb_release can't be found, then that is most likely what went wrong. If the command can't be found, install it using sudo apt install lsb-release.


Edit 2:

it is showing output :- bionic

Then something must have gone wrong while executing this line from this section of the tutorial:

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

Can you run this again and check carefully whether any warnings and/or errors are printed?

edit flag offensive delete link more

Comments

uploaded it.

Keshav gravatar imageKeshav ( 2018-12-28 06:57:51 -0500 )edit

it is showing output :- bionic

Keshav gravatar imageKeshav ( 2018-12-28 09:10:38 -0500 )edit

no errors or warnings

Keshav gravatar imageKeshav ( 2018-12-28 09:16:31 -0500 )edit

Then what is the output of cat /etc/apt/sources.list.d/ros-latest.list?

gvdhoorn gravatar imagegvdhoorn ( 2018-12-28 09:18:22 -0500 )edit

yes, now bionic was mentioned there in that. I ran the command It's working. Thanks for helping me out.

Keshav gravatar imageKeshav ( 2018-12-28 09:21:54 -0500 )edit

this helped, thanks

j.clownz gravatar imagej.clownz ( 2019-09-05 06:34:56 -0500 )edit
0

answered 2019-03-28 22:56:58 -0500

kk2105 gravatar image

You can fix the issue by following below steps:

  1. Open your /etc/apt/sources.list.d/ros-latest.list file and comment the line.

  2. Install lsb_release by running apt-get install lsb_release.

  3. Then you can follow the usual procedure for ROS installation.

Thank you, KK

edit flag offensive delete link more

Comments

I am not sure what you mean by line 1. I am having the same issue as the original user, and cannot seem to resolve it through this thread. What should I comment? Thank you for your help.

jrock gravatar imagejrock ( 2019-05-04 17:23:16 -0500 )edit

can you paste the contents of your /etc/apt/sources.list.d/ros-latest.list?

kk2105 gravatar imagekk2105 ( 2019-05-05 03:26:46 -0500 )edit

Hi kk2105. I apologize for the delay. I was trying desperately to fix the issue. Here are the contents:

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

I appreciate your help. I have used Linux for years, and this is my first time to be unable to sudo apt-get update. When I use that, get the following:

E: Malformed line 1 in source list /etc/apt/sources.list.d/rehinkdb.list (type)

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.

jrock gravatar imagejrock ( 2019-05-06 22:18:39 -0500 )edit

Can you comment that link and try (whatever the contents of /etc/apt/sources.list.d/ros-latest.list).

kk2105 gravatar imagekk2105 ( 2019-05-06 22:20:21 -0500 )edit

E: Malformed line 1 in source list /etc/apt/sources.list.d/rehinkdb.list (type) 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. E: Malformed line 1 in source list /etc/apt/sources.list.d/rehinkdb.list (type) 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.

jrock gravatar imagejrock ( 2019-05-07 22:09:48 -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: 2018-12-27 14:22:06 -0500

Seen: 2,138 times

Last updated: Mar 28