1

I'm new to Ubuntu, and despite all what I could read, I cannot find, or I'm just unable, to fix my problem.

In the upper right corner of the screen I have a "stop" sign, that says:

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:Malformed line 57 in source list/etc/apt/sources.list(dist parse))'.
This usually means > that your installed packages have unmet dependencies"

When I run "Apt-get", here is what I have:

girouxn@girouxn-ThinkPad-X220:~$ apt-get
apt 1.0.1ubuntu2 for amd64 compiled on Oct 28 2014 20:55:14
Usage: apt-get [options] command
       apt-get [options] install|remove pkg1 [pkg2 ...]
       apt-get [options] source pkg1 [pkg2 ...]

apt-get is a simple command line interface for downloading and
installing packages. The most frequently used commands are update
and install.

Commands:
   update - Retrieve new lists of packages
   upgrade - Perform an upgrade
   install - Install new packages (pkg is libc6 not libc6.deb)
   remove - Remove packages
   autoremove - Remove automatically all unused packages
   purge - Remove packages and config files
   source - Download source archives
   build-dep - Configure build-dependencies for source packages
   dist-upgrade - Distribution upgrade, see apt-get(8)
   dselect-upgrade - Follow dselect selections
   clean - Erase downloaded archive files
   autoclean - Erase old downloaded archive files
   check - Verify that there are no broken dependencies
   changelog - Download and display the changelog for the given package
   download - Download the binary package into the current directory

Options:
  -h  This help text.
  -q  Loggable output - no progress indicator
  -qq No output except for errors
  -d  Download only - do NOT install or unpack archives
  -s  No-act. Perform ordering simulation
  -y  Assume Yes to all queries and do not prompt
  -f  Attempt to correct a system with broken dependencies in place
  -m  Attempt to continue if archives are unlocatable
  -u  Show a list of upgraded packages as well
  -b  Build the source package after fetching it
  -V  Show verbose version numbers
  -c=? Read this configuration file
  -o=? Set an arbitrary configuration option, e.g. -o dir::cache=/tmp
 See the apt-get(8), sources.list(5) and apt.conf(5) manual
 pages for more information and options.
                  This APT has Super Cow Powers.
 girouxn@girouxn-ThinkPad-X220:~$

On top of this, when I open Ubuntu Software Center, it opens blank for 1 second and closes right away.

Can a good soul please help me understand and fix this issue?

Thank you very much, Nicolas


Extra info / responses

thanks for the answers. @Steeldriver: here is how my line 57 looks like:

deb http://archive.canonical.com/ partner

What is wrong with it?

@Mikolaj: here is what I get, I think it just confirms my error:

girouxn@girouxn-ThinkPad-X220:~$ sudo apt-get clean
[sudo] password for girouxn:
girouxn@girouxn-ThinkPad-X220:~$ sudo apt-get -f install
Reading package lists... Error!
E: Malformed line 57 in source list /etc/apt/sources.list (dist parse)
E: The list of sources could not be read.
E: The package lists or status file could not be parsed or opened.
girouxn@girouxn-ThinkPad-X220:~$ ^C
girouxn@girouxn-ThinkPad-X220:~$ 

Do you guys see something wrong in my line 57?

Xen2050
  • 8,705
  • 6
    The primary error appears to be E:Malformed line 57 in source list/etc/apt/sources.list: you may find How do I remove a malformed line from my sources.list? helpful. – steeldriver Feb 23 '15 at 08:41
  • +1 to steeldriver's comment, I'll bet sources.list or a file in sources.list.d contains html or javascript, likely from some misbehaving program or script – Xen2050 Feb 23 '15 at 08:49
  • Your sources.list line 57 needs to look something like deb http://archive.canonical.com/ubuntu trusty partner where trusty is the name of the release you're actually using. – steeldriver Feb 23 '15 at 12:30
  • Man, you fixed my issue! Thank you so much. I don't want to remain ignorant: could you please tell how you got to know what to write in my line 57? Is this "source list" a piece of code or something that is common for every Ubuntu user? – Nicolas Giroux Feb 23 '15 at 14:05
  • If I just broke the "no chit chat" rule of this forum, please disregard my request. – Nicolas Giroux Feb 23 '15 at 14:06
  • The sources.list file is part of the installation. Ubuntu creates it based on the version you are installing and your location. So it is not the same for everyone, but the variations are predictable – Zanna Dec 29 '16 at 10:26

2 Answers2

1

At first sight, it looks like a dependency problem. To fix it, open the Terminal and type the following commands:

$ sudo apt-get clean

$ sudo apt-get -f install

The first one will remove any cached packages, the second one will fix all missing dependencies between packages currently installed in your system.

0

Although I personally haven't experienced this and I'm curious as to why this unfortunate turn of events has found its way to your desktop, I just opened the Software Center with no issues. I'll try my best to help.

If you want to install a piece of software, you can simply install it manually via the terminal:

sudo apt-get install [package-name]

After installation run:

sudo apt-get update [package-name]

If you have issues with this, look up on Google the cache command-line. I could do this for you, but you have not listed the software you intend to download.

If things are what I believe, you may have some serious bugs or worms.

If this is the case, you may not have upgraded to the new milestone release Ubuntu 14.04.2 LTS.

If you are unsure run this:

lsb_release -a  

if you still have 14.04.1 open a terminal and run:

sudo apt-get upgrade

and accept the y/n. This should upgrade your system to the latest security milestone where they send an update where they have gone through the system and killed the bugs and worms.

If all else fails, try a system clean via the terminal:

sudo apt-get update   
sudo apt-get upgrade   
sudo apt-get autoremove   
sudo apt-get clean all   

If all of this doesn't work, then I cannot further assist you, but I will bestow upon you a magical and powerful gift the help you on your way... Open a web browser and go to... www.google.com for it is a wonderful, powerful and useful thing.

karel
  • 114,770
Tactux
  • 166