Sources.list probably contains invalid section

Asked by JL

Binary package hint: update-manager

This is the message when I try to update to the new version 8.04 (adept and synaptic) while "Configurando nuevos canales de software":

Failed to fetch http://es.archive.ubuntu.com/ubuntu/dists/hardy/Release Unable to find expected entry web/binary-i386/Packages in Meta-index file (malformed Release file?)
Failed to fetch http://es.archive.ubuntu.com/ubuntu/dists/hardy-updates/Release Unable to find expected entry web/binary-i386/Packages in Meta-index file (malformed Release file?)
Failed to fetch http://security.ubuntu.com/ubuntu/dists/hardy-security/Release Unable to find expected entry web/binary-i386/Packages in Meta-index file (malformed Release file?)

I'm not a skill user. ¿What to do? I didn't find information for this bug at your site. Sorry if it exists and I am repeating.

Running Kubuntu 7.10

Thanks a lot and sorry for my english.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu update-manager Edit question
Assignee:
No assignee Edit question
Solved by:
JL
Solved:
Last query:
Last reply:

This question was originally filed as bug #227191.

Revision history for this message
Michael Vogt (mvo) said :
#1

Thanks for your bugreport.

This looks like your sources.list file contains a invalid section entry. There should only be "main restricted universe multiverse" but it seems for some reason you also have "web" there. Please fix that and then the upgrade should work as expected.

I convert this bug into a question as it seems more appropriate.

Revision history for this message
Bhavani Shankar (bhavi) said :
#2

Hello

You have added some incorrect lines to your file /etc/apt/sources.list, which probably should have been executed in a terminal instead.
To resolve this you need to edit the file /etc/apt/sources.list and remove the referred line(s) that should not be there.
As a guide, sources.list should only contain lines that start "deb", "deb-src", "cdrom" or a "#" symbol, anything else is wrong and should not be there. Please refer to the error message, which should contain a line number.
To edit the sources.list file, press ALT+F2 at the Ubuntu desktop and then type the following command in the box, depending on your Ubuntu flavour:
For Ubuntu:
gksudo gedit /etc/apt/sources.list
For Kubuntu:
kdesudo kwrite /etc/apt/sources.list
Exactly as you see it there, then press enter/return. Enter your password when prompted and edit the file in the editor as advised above. You should then save and quit the editor.
The program which reads /etc/apt/sources.list should work again.

For Kubuntu 7.10 please paste the below:

#deb cdrom:[Kubuntu 7.10 _Gutsy Gibbon_ - Release i386 (20071016)]/ gutsy 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/ gutsy main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ gutsy-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy-updates main restricted

## 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
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://us.archive.ubuntu.com/ubuntu/ gutsy universe
deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy universe
deb http://us.archive.ubuntu.com/ubuntu/ gutsy-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy-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://us.archive.ubuntu.com/ubuntu/ gutsy multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy multiverse
deb http://us.archive.ubuntu.com/ubuntu/ gutsy-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy-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://us.archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy-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 gutsy partner
deb-src http://archive.canonical.com/ubuntu gutsy partner

deb http://security.ubuntu.com/ubuntu gutsy-security main restricted
deb-src http://security.ubuntu.com/ubuntu gutsy-security main restricted
deb http://security.ubuntu.com/ubuntu gutsy-security universe
deb-src http://security.ubuntu.com/ubuntu gutsy-security universe
deb http://security.ubuntu.com/ubuntu gutsy-security multiverse
deb-src http://security.ubuntu.com/ubuntu gutsy-security multiverse

Save the source list

and type the command in a Konsole:

sudo apt-get update

and try again

Regards

Bhavani Shankar.

Revision history for this message
JL (jlcastilloch) said :
#3

Thanks a lot!!! Specially to Bhavani Shankar for the detailed list of what to do.

Unfortunately, I got a message while I was updating (nothing related to the problem I said): pipeline broken. I switch off the computer I it runs from bad to worse. So, I decided to do a clean installation.

But thanks for your time and your patience with a newbie (like me) question (like mine).

Revision history for this message
Ziaa (ziaphx-2007) said :
#4

Excuse me!!!!!!!!!!!!
            But the probelm arises that /etc/apt/sources.list cann't save any changes. When I edit in it gives warning as such:-
             Error - Kate
The document could not be saved, as it was not possible to write to
file:///etc/apt/sources.list.

Check that you have write to access to this file or that enough disk space is available.

Revision history for this message
swinfough32955 (steve-winfough) said :
#5

Thank You Thank You Thank You.... I am such a novice with Ubuntu that it's painful when I can't figure out this stuff. Argh... Bhavani ~ you my friend, are the man! Your instructions were exactly what I needed.

Alt + F2 on the desktop to launch the quick launch window
entering:
gksudo gedit /etc/apt/sources.list

After I removed the "web" from this file I tried the update manager. At first it failed again but while I was looking through that same folder where sources.list resides, I found another file "sources.list.upgrade". So I repeated the steps for sources.list AND sources.list.upgrade. Saved both files without the "web" and this time SUCCESS!!!!

I really appreciate your post! I hope this post will help out others in my situation.

Thank you!