0

I want to install hadoop in my Ubuntu 14.04 system. Following the instruction of a blog, I need to update the "source list".

But when I input the command: sudo apt-get update I get errors:

E: Type '--2016-08-04' is not known on line 1 in source list /etc/apt/sources.list       E: The list of sources could not be read.
E: The package lists or status file could not be parsed or opened.

At the same time, a stop sign shows in the upper right of the menu says that:

An error occured. Please run Package Manager from the right-click menu or run apt-get in a terminal to see what is wrong.

The error message was:

'Unknown error: '<class 'SystemError'
E:Type '--2016-08-04' is not known on line 1 in the source list /etc/apt/sources.list.
This usually means that your installed packages have unmet dependencies"

/etc/apt/sources.list:

--2016-08-04 21:29:00-- (try: 1) http://pastebin.com     
/raw.php?i=uzhrtg5M Resolving pastebin.com (pastebin.com)...     
104.20.63.56, 104.20.64.56 Connecting to pastebin.com  
(pastebin.com)|104.20.63.56|:80... connected.
HTTP request sent, awaiting response...
Read error (Connection reset by peer) in headers. Retrying.

This is the beginning of the sources.list.

1

1 Answer 1

1

Open /etc/apt/sources.list in an editor as a root (e.g. type in terminal gksudo gedit /etc/apt/sources.list), and replace all its content with the following

#############################################################
################### OFFICIAL UBUNTU REPOS ###################
#############################################################

###### Ubuntu Main Repos
deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse 
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse 

###### Ubuntu Update Repos
deb http://us.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse 
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse 
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse 
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse 

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu trusty partner
deb-src http://archive.canonical.com/ubuntu trusty partner

###### Ubuntu Extras Repo
deb http://extras.ubuntu.com/ubuntu trusty main
deb-src http://extras.ubuntu.com/ubuntu trusty main

Your problem is that in this file instead of repositorires some kind of output of a command. I have no idea how it got there, you would probably better know that.

6
  • yes ,that worked , I replace my sources.list with you answer , restart the computer ,Then run the "sudo apt-get update" again, and there was no errors ,and it works! Thanks very much !
    – zhangwp
    Aug 11, 2016 at 13:28
  • @zhangwp no problem =) Btw, if you're going to edit the file: there's no need to reboot, the file being re-read on every update.
    – Hi-Angel
    Aug 11, 2016 at 15:09
  • 1
    +1 but just to note this is using US mirror, maybe better to suggest main mirror for more widely applicable solution and also mention that partner repo etc include non-foss 3rd party apps iirc
    – Zanna
    Nov 29, 2016 at 18:20
  • @Zanna tbh it was just a quick answer to an easy question, and I already don't even remember where did I get the sources.list from. I don't actually think anybody aside of the author would ever stumble upon this question (as in, not the problem, but this particular post on the site). The proper solution would probably be to close it as a duplicate of, say, this one.
    – Hi-Angel
    Dec 2, 2016 at 20:25
  • @Zanna Ah, yeah, IIRC this answer (as for, why I didn't vote to close as a dup) was in particular stimulated by the fact that the question itself was mangled, and it wasn't obvious what the problem author has suffered of. So, when I figured it out, it seemed to me funny enough that I get the idea of what was the problem about, so I posted an answer. And in particular it was for other peoples to not spend their time on this question anymore.
    – Hi-Angel
    Dec 2, 2016 at 20:29

Not the answer you're looking for? Browse other questions tagged .