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

Asked by Will Cook

I installed Ubuntu for dual boot with Windows and few days ago and all I have done is installed Java so I was able to play Minecraft. I booted up today and I get this error message in the system bar. What is this error message and how can I fix it?

Thanks

Question information

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

Can you give the output of:

lsb_release -a; uname -a; head -n 6 /etc/apt/sources.list

Thanks

Revision history for this message
N1ck 7h0m4d4k15 (nicktux) said :
#2

Hi ,
like the message says , you have a malformed line in /etc/apt/sources.list

I think it might be better to give full results here , cuz it is possible other lines are malformed too.

++++++++++++++++++++++
cat -n /etc/apt/sources.list
++++++++++++++++++++++
and we will tell you what line (or lines) need a correction.

Thank you.

Revision history for this message
Will Cook (cooktastiic) said :
#3

This is the contents of /etc/apt/sources.list

# /etc/apt/sources.list

deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://archive.canonical.com/precise partner
deb-src http://archive.canonical.com/precise partner

There isn't 6 lines though?

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

ok, run:

cd $HOME
wget https://dl.dropbox.com/u/8850924/sources.list
sudo mv ./sources.list /etc/apt
sudo apt-get update

Should be ok

Revision history for this message
Will Cook (cooktastiic) said :
#5

This is what I got. Still has a problem.

@ubuntu:~$ cd $HOME
@ubuntu:~$ wget https://dl.dropbox.com/u/8850924/sources.list
--2012-08-26 11:00:47-- https://dl.dropbox.com/u/8850924/sources.list
Resolving dl.dropbox.com (dl.dropbox.com)... 50.17.205.241, 107.20.132.43, 23.21.70.194, ...
Connecting to dl.dropbox.com (dl.dropbox.com)|50.17.205.241|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3594 (3.5K) [text/plain]
Saving to: `sources.list'

100%[====================================================================================>] 3,594 --.-K/s in 0s

2012-08-26 11:00:48 (862 MB/s) - `sources.list' saved [3594/3594]

@ubuntu:~$ sudo mv ./sources.list/etc/apt
[sudo] password for ***:
mv: missing destination file operand after `./sources.list/etc/apt'
Try `mv --help' for more information.

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

You butchered the command I gave, if you copy and paste, you won't have an issue and is WHY I give the exact command you need....

Revision history for this message
Will Cook (cooktastiic) said :
#7

Sorry I'm new to it, I didn't realise you could copy and paste into the terminal and I didn't think you needed to do it all at once.

But thanks, it has worked now.

Revision history for this message
Will Cook (cooktastiic) said :
#8

Thanks actionparsnip, that solved my question.