E:Type 'the' is not known on line 62 in source list /etc/apt/sources.list

Asked by Daniel Rayner

Im new to Ubuntu and have a red minus icon on my startbar that gives this error message when i try and update:

E:Type 'the' is not known on line 62 in source list /etc/apt/sources.list

How do i resolve this issue please?

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
Chris
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Can you give the output of:

head -n 62 /etc/apt/sources.list | tail -n 1; echo; cat /etc/lsb-release

Thanks

Revision history for this message
Chris (fabricator4) said :
#2

Open update manager and click on settings.

Open the sources and click on the "other software" tab. In there somewhere you will find an incorrect line that has been added, it will start with the word "the" instead of "deb". Possibly, you've cut and pasted some commands from somewhere that has broken the sources list.

If you still can't fix it, post the output from the following terminal command:

sudo apt-get update

which will try to update the package lists from the sources.

Chris

Revision history for this message
Daniel Rayner (dan-rayner-3) said :
#3

Hi, im not sure if this is the information you need:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.10
DISTRIB_CODENAME=oneiric
DISTRIB_DESCRIPTION="Ubuntu 11.10"

Thanks

Revision history for this message
Daniel Rayner (dan-rayner-3) said :
#4

Hi Chris,

Update manager wont open, it just gives me an error message each time i try and open it.

Also sudo apt-get update doesnt seem to resolve the issue either.

Thanks

Revision history for this message
Chris (fabricator4) said :
#5

I didn't expect update to resolve it, I wanted you to post the error messages from it so that we had more of an idea where and why it was falling over.

Chris

Revision history for this message
Daniel Rayner (dan-rayner-3) said :
#6

Oh ok, this is the error message:

Could not initialise the package information

An unresolvable problem occurred while initialising the package information.

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

'E:Type ‘the’ is not known on line 62 in source list /etc/apt/sources.list'

Thanks
Dan

Revision history for this message
Daniel Rayner (dan-rayner-3) said :
#7

the error message i get through terminal is:

E: Type ‘the’ is not known on line 62 in source list /etc/apt/sources.list
E: The list of sources could not be read.

Does this help more?

Thanks
Dan

Revision history for this message
Chris (fabricator4) said :
#8

It's hasn't give the whole line that is causing the problem, so all we know is that it starts with the word 'the'.

You may need to edit the sources.list manually. Open a terminal window and use the following command:

sudo nano /etc/apt/sources.list

nano is good editor to use because it will colour code the text. Blue lines will be comments and will start with '#'. Correctly formatted source lines will start with 'deb' or 'deb-src' in brown/yellow and have the location in green. Anything else, such as the line that starts with 'the' will probably be white. I'm guessing that something has been added to this file that shouldn't be there. Either a comment was incorrectly uncommented, or something else has added some text. The correct format will be something like:

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

deb http://mirror.aarnet.edu.au/pub/ubuntu/archive/ lucid main restricted
deb-src http://mirror.aarnet.edu.au/pub/ubuntu/archive/ lucid main restricted

----------------------------------------------------------------------

Anything else you should either comment out or delete if it obviously shouldn't be there. If you really cannot work it out post the entire contents of your sources.list file so we can see it. Note that where my example above says 'lucid' yours will say 'oneiric'. That's because I'm on my Lucid LTS machine at the moment.

Chris

Revision history for this message
Chris (fabricator4) said :
#9

By the way, you only posted part of what Andrew asked for. The first part would have printed out the offending line in sources.list so we could see what it was. Try again:

head -n 62 /etc/apt/sources.list | tail -n 1

Then find this line in sources.list with nano as above.

Chris.

Revision history for this message
Daniel Rayner (dan-rayner-3) said :
#10

# deb cdrom:[Ubuntu 11.10 _Oneiric Ocelot_ - Release i386 (20111012)]/ oneiric main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://gb.archive.ubuntu.com/ubuntu/ oneiric main restricted
deb-src http://gb.archive.ubuntu.com/ubuntu/ oneiric main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://gb.archive.ubuntu.com/ubuntu/ oneiric-updates main restricted
deb http://download.skype.com/linux/repos/debian/ stable non-free
deb-src http://gb.archive.ubuntu.com/ubuntu/ oneiric-updates main restricted

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

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

## '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 oneiric partner
# deb-src http://archive.canonical.com/ubuntu oneiric partner

  GNU nano 2.2.6 File: /etc/apt/sources.list

# deb http://archive.canonical.com/ubuntu oneiric partner
# deb-src http://archive.canonical.com/ubuntu oneiric partner
#deb http://repository.spotify.com stable non-free
## 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 oneiric main
#deb-src http://extras.ubuntu.com/ubuntu oneiric main
#[...]
## 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 oneiric partner
#deb-src http://archive.canonical.com/ubuntu oneiric partner

## 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 oneiric main
#deb-src http://extras.ubuntu.com/ubuntu oneiric main
[...]deb http://packages.linuxmint.com/ lisa main upstream import

Thats my contents.

And the other part is this:

dan@dan-System-Product-Name:~$ head -n 62 /etc/apt/sources.list | tail -n 1
## respective vendors as a service to Ubuntu users.
dan@dan-System-Product-Name:~$ head -n 62 /etc/apt/sources.list | tail -n 1; echo; cat /etc/lsb-release
## respective vendors as a service to Ubuntu users.

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.10
DISTRIB_CODENAME=oneiric
DISTRIB_DESCRIPTION="Ubuntu 11.10"
dan@dan-System-Product-Name:~$

Revision history for this message
Best Chris (fabricator4) said :
#11

you've got a linux mint lisa repository in there for some reason.

The word 'the' should not appear on it's own line, so something has messed around with the sources.list file. The line with the word 'the' on its own is already commented out, so you either just commented it out, or it is not the line that is causing you problems (but it appears that it is indeed the problem)

Lines in this file should start with either '#', or 'deb'. 'deb' lines must be of the correct format. Lines that you've posted here that include '[...]' would be incorrect, but it's likely this is an artifact that you've introduced in the cut and paste. It should not be in the sources.list file if you look at it with nano.

If you fix sources.list according to this formula it should start working fine.

Chris

Revision history for this message
Daniel Rayner (dan-rayner-3) said :
#12

Thanks Chris, that solved my question.

Revision history for this message
Daniel Rayner (dan-rayner-3) said :
#13

thanks for all your help its fixed now

Dan