E: Malformed line 42 in source list /etc/apt/sources.list (dist parse)

Asked by Chetan Naik

Error in terminal whe doing ...sudo apt-get update

E: Malformed line 42 in source list /etc/apt/sources.list (dist parse)

tried ... gksudo gedit/etc/apt/sources.list

does not open anything.

opened sources.list which shows following...

# deb cdrom:[Ubuntu 10.04.3 LTS _Lucid Lynx_ - Release i386 (20110720.1)]/ lucid main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://us.archive.ubuntu.com/ubuntu/ lucid main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid main restricted

## Major bug fix updates produced after the final release of the
## distribution.

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ lucid universe
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://us.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu lucid partner
deb-src http://archive.canonical.com/ubuntu lucid partner

deb http://archive.canonical.com/lucid partner

any solution???

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu update-manager Edit question
Assignee:
No assignee Edit question
Solved by:
arochester
Solved:
Last query:
Last reply:
Revision history for this message
Best arochester (arochester) said :
#1

tried ... gksudo gedit/etc/apt/sources.list

Missed space between getit and /etc/. It's: gksudo gedit /etc/apt/sources.list

The last line is wrong. It's just a near duplicate of line 39. Delete last line.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

To clarify, change:

deb http://archive.canonical.com/lucid partner

To:

deb http://archive.canonical.com lucid partner

HTH

Revision history for this message
Chetan Naik (chnnaik) said :
#3

Thanks arochester, that solved my question.

Revision history for this message
Chetan Naik (chnnaik) said :
#4

Thanks Andrew,

So fast an answer that helped me, thats really cool! God bless you!

Revision history for this message
Nithya (info-snithya) said :
#5

Hi ,
 Even i am facing same kind of issue. Could you please help me here.

 sudo apt-get update
E: Malformed line 42 in source list /etc/apt/sources.list (dist parse)
E: The list of sources could not be read.

# deb cdrom:[Ubuntu 12.04 _Precise_ - Build amd64 LIVE Binary 20130203-13:50]/ precise main

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirror.kavalinux.com/ubuntu/ precise main restricted

## Major bug fix updates produced after the final release of the
## distribution.

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://mirror.kavalinux.com/ubuntu/ precise universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://mirror.kavalinux.com/ubuntu/ precise multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner

## Uncomment the following two lines to add software from Ubuntu's
## 'extras' repository.
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main
deb http://archive.canonical.com/ partner
deb-src http://archive.canonical.com/ partner
deb http://security.ubuntu.com/ubuntu/ precise-security restricted main multiverse universe
deb http://mirror.kavalinux.com/ubuntu/ precise-updates restricted main multiverse universe
deb http://mirror.kavalinux.com/ubuntu/ precise-backports restricted main multiverse universe

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

run:

gksudo gedit /etc/apt/sources.list

remove these last lines:

deb http://mirror.kavalinux.com/ubuntu/ precise-updates restricted main multiverse universe
deb http://mirror.kavalinux.com/ubuntu/ precise-backports restricted main multiverse
universe

Save the new files, close gedit, and run:

sudo apt-get update