How do I fix "malformed line 1 in source list /etc/apt/sources list (dist)

Asked by Stephen Blumstein

I can't install updates because of the following message:

Could not initialize the package information

An unresolvable problem occurred while initializing the package information.

Please report this bug against the 'update-manager' package and include the following error message:

'E:Malformed line 1 in source list /etc/apt/sources.list (dist)'

Question information

Language:
French Edit question
Status:
Answered
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
mycae (mycae) said :
#1

can you post the contents onf your /etc/apt/sources.list

if you don't know what to do, simply press Ctrl+Alt+T, then paste this

cat /etc/apt/sources.list

then paste the result back here.

Revision history for this message
Stephen Blumstein (hgytre) said :
#2

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://archive.ubuntu.com/ubuntu maverick main restricted
deb-src http://archive.ubuntu.com/ubuntu maverick restricted main multiverse main'. universe #Added by software-properties

## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu maverick-updates restricted main main'.
deb-src http://archive.ubuntu.com/ubuntu maverick-updates restricted main multiverse main'. universe #Added by software-properties

## 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://archive.ubuntu.com/ubuntu maverick universe
deb http://archive.ubuntu.com/ubuntu maverick-updates 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://archive.ubuntu.com/ubuntu maverick multiverse
deb http://archive.ubuntu.com/ubuntu maverick-updates 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://archive.ubuntu.com/ubuntu maverick-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu maverick-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.
## http://archive.canonical.com/ubuntu maverick partner
deb-src http://archive.canonical.com/ubuntu maverick 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 maverick main
deb-src http://extras.ubuntu.com/ubuntu maverick main

deb http://archive.ubuntu.com/ubuntu maverick-security main restricted
deb-src http://archive.ubuntu.com/ubuntu maverick-security restricted main multiverse universe #Added by software-properties
deb http://archive.ubuntu.com/ubuntu maverick-security universe
deb http://archive.ubuntu.com/ubuntu maverick-security multiverse
deb http://archive.ubuntu.com/ubuntu maverick main'.
deb http://archive.ubuntu.com/ubuntu maverick-proposed restricted main multiverse main'. universe
deb-src http://archive.ubuntu.com/ubuntu maverick-proposed restricted main multiverse main'. universe #Added by software-properties
deb http://archive.ubuntu.com/ubuntu maverick-backports main'.
deb-src http://archive.ubuntu.com/ubuntu maverick-backports main'. #Added by software-properties
deb http://security.ubuntu.com/ubuntu/ maverick-security restricted main multiverse main'. universe
deb-src http://archive.ubuntu.com/ubuntu maverick-security main'. #Added by software-properties

Revision history for this message
mycae (mycae) said :
#3

You seem to have

>'.< (without angle brackets) a lot. This isn't right. There should not be the singlequote-period combination in there. I recommend removing these. I am uncertain why they are there, unless you have been altering your software sources, which might explain it.

To edit the file, press alt+f2, then run:

gksudo /etc/apt/sources.list

then find and replace >'.< (without angle brackets) with nothing (i.e. the empty string), then save the document. Do this for all instances of '.

If this then does not work, can you run:

find /etc/apt/

and post the results back here, as you may have other sources files, which I have missed, for which we would need to repeat a similar procedure.

Revision history for this message
Stephen Blumstein (hgytre) said :
#4

Hi mycae,

      thanks a lot for your assistance with the sources file so far. I'n remover all od the single quote operiods <'.>, within the brackets as instructed. I've also removed the hashtags from lines 40 and 41, archive.ubuntu.com/maverick-backports.

However, I still can't upgrade to Ubuntu 11.04 natty Maverick, anf get this set of error messages for that:

W:Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty/Release Unable to find expected entry main'./binary-i386/Packages in Meta-index file (malformed Release file?)
, W:Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty-backports/Release Unable to find expected entry main'./source/Sources in Meta-index file (malformed Release file?)
, W:Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty-security/Release Unable to find expected entry main'./source/Sources in Meta-index file (malformed Release file?)
, W:Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty-proposed/Release Unable to find expected entry main'./source/Sources in Meta-index file (malformed Release file?)
, E:Some index files failed to download, they have been ignored, or old ones used instead.

Revision history for this message
3depict (tehuser) said :
#5

Can you run the find command I posted? You appear to have more sources files (natty is not mentioned in your sources.list).

once you do this, can you also post the content of any other list files?

Revision history for this message
Stephen Blumstein (hgytre) said :
#6

3depict (tehuser),

Here is the contents of the find /etc/apt command as instructed:

/etc/apt/
/etc/apt/trusted.gpg~
/etc/apt/trusted.gpg
/etc/apt/sources.list.d
/etc/apt/sources.list.d/canonical-partner-maverick.list.save
/etc/apt/sources.list.d/google-talkplugin.list
/etc/apt/sources.list.d/canonical-partner-maverick.list.distUpgrade
/etc/apt/sources.list.d/google-talkplugin.list.save
/etc/apt/sources.list.d/canonical-partner-maverick.list
/etc/apt/sources.list.d/google-talkplugin.list.distUpgrade
/etc/apt/sources.list.save
/etc/apt/sources.list.distUpgrade
/etc/apt/source.list
/etc/apt/sources.list
/etc/apt/apt.conf.d
/etc/apt/apt.conf.d/20archive
/etc/apt/apt.conf.d/15update-stamp
/etc/apt/apt.conf.d/70debconf
/etc/apt/apt.conf.d/50unattended-upgrades
/etc/apt/apt.conf.d/00trustcdrom
/etc/apt/apt.conf.d/20dbus
/etc/apt/apt.conf.d/99synaptic
/etc/apt/apt.conf.d/01autoremove
/etc/apt/apt.conf.d/10periodic
/etc/apt/apt.conf.d/99update-notifier
/etc/apt/secring.gpg
/etc/apt/preferences.d
/etc/apt/trustdb.gpg
/etc/apt/trusted.gpg.d

Revision history for this message
mycae (mycae) said :
#7

OK, you seem to have a bit of cruft in there. There are two ways to do this

1) find the broken sources which are in at least one of the files in /etc/apt/sources.list.d/ . It looks to be the same procedure as last time, just with the different file.

My guess is it is in /etc/apt/sources.list.d/canonical-partner-maverick.list.distUpgrade, but there could be more than one.

2) move the files in /etc/apt/sources.list.d/ to your home folder, then re-add them one by one to find the broken file.

to move the files, you will need to run the file browser as administrator, using

Either use the terminal, or use Alt+F2 (to bring up the run dialog), then:

gksudo nautilus

Can you help with this problem?

Provide an answer of your own, or ask Stephen Blumstein for more information if necessary.

To post a message you must log in.