System Errors - Package Manager

Asked by KD

mvd@MVD-CQ4010F:~$ ubuntu-support-status
Traceback (most recent call last):
  File "/usr/bin/ubuntu-support-status", line 122, in <module>
    with apt.Cache() as cache:
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 107, in __init__
    self.open(progress)
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 151, in open
    self._cache = apt_pkg.Cache(progress)
SystemError: E:Malformed line 47 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.
mvd@MVD-CQ4010F:~$ cat /etc/dpkg/dpkg.cfg.d/multiarch
cat: /etc/dpkg/dpkg.cfg.d/multiarch: No such file or directory
mvd@MVD-CQ4010F:~$ dpkg --print-foreign-architectures
i386
mvd@MVD-CQ4010F:~$ sudo grep -R proxy /etc/apt/*
[sudo] password for mvd:
mvd@MVD-CQ4010F:~$ grep proxy /etc/environment
mvd@MVD-CQ4010F:~$ echo $http_proxy

mvd@MVD-CQ4010F:~$ grep proxy /etc/bash.bashrc
mvd@MVD-CQ4010F:~$ grep proxy ~/.bashrc
mvd@MVD-CQ4010F:~$ cat /etc/apt/apt.conf
cat: /etc/apt/apt.conf: No such file or directory
mvd@MVD-CQ4010F:~$ sudo fuser -vvv /var/lib/dpkg/lock
mvd@MVD-CQ4010F:~$ sudo fuser -vvv /var/cache/apt/archives/lock
mvd@MVD-CQ4010F:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=15.04
DISTRIB_CODENAME=vivid
DISTRIB_DESCRIPTION="Ubuntu 15.04"
mvd@MVD-CQ4010F:~$ uname -a
Linux MVD-CQ4010F 3.19.0-30-generic #33-Ubuntu SMP Mon Sep 21 20:58:04 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
mvd@MVD-CQ4010F:~$ sudo rm /var/lib/apt/lists/lock
mvd@MVD-CQ4010F:~$ sudo rm /var/cache/apt/archives/lock
mvd@MVD-CQ4010F:~$ sudo rm /var/lib/dpkg/lock
mvd@MVD-CQ4010F:~$ sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
mvd@MVD-CQ4010F:~$ sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
mvd@MVD-CQ4010F:~$ sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status || sudo cp /var/backups/apt.extended_states.0 /var/lib/dpkg/status
mvd@MVD-CQ4010F:~$ sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad
mvd@MVD-CQ4010F:~$ sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
mvd@MVD-CQ4010F:~$ sudo rm -rf /var/lib/dpkg/updates/*
mvd@MVD-CQ4010F:~$ sudo rm -rf /var/lib/apt/lists
mvd@MVD-CQ4010F:~$ sudo rm /var/cache/apt/*.bin
mvd@MVD-CQ4010F:~$ sudo mkdir /var/lib/apt/lists
mvd@MVD-CQ4010F:~$ sudo mkdir /var/lib/apt/lists/partial
mvd@MVD-CQ4010F:~$ LANG=C;sudo apt-get clean
mvd@MVD-CQ4010F:~$ LANG=C;sudo apt-get autoclean
Reading package lists... Error!
E: Malformed line 47 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.
mvd@MVD-CQ4010F:~$ sudo dpkg --configure -a
mvd@MVD-CQ4010F:~$ sudo dpkg --clear-avail
mvd@MVD-CQ4010F:~$ LANG=C;sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
mvd@MVD-CQ4010F:~$ LANG=C;sudo apt-get --fix-missing install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
mvd@MVD-CQ4010F:~$ LANG=C;sudo apt-get --purge autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
mvd@MVD-CQ4010F:~$ LANG=C;sudo apt-get --fix-missing update -o APT::Cache-Limit=100000000
E: Malformed line 47 in source list /etc/apt/sources.list (dist parse)
E: The list of sources could not be read.
mvd@MVD-CQ4010F:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=100000000 && sudo apt-get dist-upgrade
E: Malformed line 47 in source list /etc/apt/sources.list (dist parse)
E: The list of sources could not be read.
mvd@MVD-CQ4010F:~$ find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;

/etc/apt/sources.list.d/private-ppa.launchpad.net_commercial-ppa-uploaders_color-by-numbers-flowers_ubuntu.list

     1 # deb https://private-ppa.launchpad.net/commercial-ppa-uploaders/color-by-numbers-flowers/ubuntu utopic main #Added by software-center; credentials stored in /etc/apt/auth.conf disabled on upgrade to utopic

/etc/apt/sources.list.d/minecraft-installer-peeps-ubuntu-minecraft-installer-vivid.list

     1 # deb http://ppa.launchpad.net/minecraft-installer-peeps/minecraft-installer/ubuntu vivid main
     2 # deb-src http://ppa.launchpad.net/minecraft-installer-peeps/minecraft-installer/ubuntu vivid main

/etc/apt/sources.list.d/dropbox.list

     1 # deb [arch=i386,amd64] http://linux.dropbox.com/ubuntu vivid main

/etc/apt/sources.list.d/private-ppa.launchpad.net_commercial-ppa-uploaders_color-by-numbers-flowers-free_ubuntu.list

     1 # deb https://private-ppa.launchpad.net/commercial-ppa-uploaders/color-by-numbers-flowers-free/ubuntu utopic main #Added by software-center; credentials stored in /etc/apt/auth.conf disabled on upgrade to utopic

/etc/apt/sources.list.d/google-chrome.list

     1 ### THIS FILE IS AUTOMATICALLY CONFIGURED ###
     2 # You may comment out this entry, but any other modifications may be lost.
     3 # deb http://dl.google.com/linux/chrome/deb/ stable main

/etc/apt/sources.list.d/private-ppa.launchpad.net_commercial-ppa-uploaders_color-by-numbers-princesses_ubuntu.list

     1 # deb https://private-ppa.launchpad.net/commercial-ppa-uploaders/color-by-numbers-princesses/ubuntu utopic main #Added by software-center; credentials stored in /etc/apt/auth.conf disabled on upgrade to utopic

/etc/apt/sources.list

     1 deb cdrom:[Ubuntu 14.04.1 LTS _Trusty Tahr_ - Release amd64 (20140722.2)]/ trusty main restricted
     2
     3 # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
     4 # newer versions of the distribution.
     5 deb http://us.archive.ubuntu.com/ubuntu/ vivid main restricted
     6 deb-src http://us.archive.ubuntu.com/ubuntu/ vivid restricted universe main multiverse #Added by software-properties
     7
     8 ## Major bug fix updates produced after the final release of the
     9 ## distribution.
    10 deb http://us.archive.ubuntu.com/ubuntu/ vivid-updates main restricted
    11 deb-src http://us.archive.ubuntu.com/ubuntu/ vivid-updates restricted universe main multiverse #Added by software-properties
    12
    13 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    14 ## team. Also, please note that software in universe WILL NOT receive any
    15 ## review or updates from the Ubuntu security team.
    16 deb http://us.archive.ubuntu.com/ubuntu/ vivid universe
    17 deb http://us.archive.ubuntu.com/ubuntu/ vivid-updates universe
    18
    19 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    20 ## team, and may not be under a free licence. Please satisfy yourself as to
    21 ## your rights to use the software. Also, please note that software in
    22 ## multiverse WILL NOT receive any review or updates from the Ubuntu
    23 ## security team.
    24 deb http://us.archive.ubuntu.com/ubuntu/ vivid multiverse
    25 deb http://us.archive.ubuntu.com/ubuntu/ vivid-updates multiverse
    26
    27 ## N.B. software from this repository may not have been tested as
    28 ## extensively as that contained in the main release, although it includes
    29 ## newer versions of some applications which may provide useful features.
    30 ## Also, please note that software in backports WILL NOT receive any review
    31 ## or updates from the Ubuntu security team.
    32 deb http://us.archive.ubuntu.com/ubuntu/ vivid-backports main restricted universe multiverse
    33 deb-src http://us.archive.ubuntu.com/ubuntu/ vivid-backports main restricted universe multiverse #Added by software-properties
    34
    35 deb http://security.ubuntu.com/ubuntu vivid-security main restricted
    36 deb-src http://security.ubuntu.com/ubuntu vivid-security restricted universe main multiverse #Added by software-properties
    37 deb http://security.ubuntu.com/ubuntu vivid-security universe
    38 deb http://security.ubuntu.com/ubuntu vivid-security multiverse
    39
    40 ## Uncomment the following two lines to add software from Canonical's
    41 ## 'partner' repository.
    42 ## This software is not part of Ubuntu, but is offered by Canonical and the
    43 ## respective vendors as a service to Ubuntu users.
    44 deb http://archive.canonical.com/ubuntu trusty partner
    45 deb-src http://archive.canonical.com/ubuntu trusty partner
    46
    47 deb http://archive.canonical.com/preise partner
    48 deb-src http://archive.canonical.com/preise partner
    49 deb http://us.archive.ubuntu.com/ubuntu/ vivid-proposed restricted universe multiverse main
mvd@MVD-CQ4010F:~$ ^C
mvd@MVD-CQ4010F:~$

Question information

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

Run:

sudo gedit /etc/apt/sources.list

Change:

deb http://archive.canonical.com/preise partner
deb-src http://archive.canonical.com/preise partner

To

deb http://archive.canonical.com /vivid partner
deb-src http://archive.canonical.com/ vivid partner

Save the new file, close gedit and run:

sudo apt-get updte

Is it smooth?

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

Sorry, change it to:

deb http://archive.canonical.com/ vivid partner
deb-src http://archive.canonical.com/ vivid partner

Bit of a typo.

Thanks

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

You should also delete lines 44 and 45

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

they are for an older Ubuntu release and obsolete for your system.

Furthermore you should put a comment indicator ('#') in front of the first line

changing it from
deb cdrom:[Ubuntu 14.04.1 LTS _Trusty Tahr_ ...
into
# deb cdrom:[Ubuntu 14.04.1 LTS _Trusty Tahr_ ...

to avoid that you get warning messages about the installation DVD not being present.

Can you help with this problem?

Provide an answer of your own, or ask KD for more information if necessary.

To post a message you must log in.