'Error Broken Count > 0' | Installed packages have unmet dependencies

Asked by Gayan Weerakutti

This is in a fresh ubuntu install. dist-upgraded (No PPAs are used). Yesterday I tried to install ubuntu-benchmark-tools and got the following errors. Now the package manger seems to be broken.

I've followed the PackageManagerTroubleshootingProcedure. Terminal outputs are as follows ...

Log started: 2014-09-13 21:34:12

(Reading database ... ^M(Reading database ... 100%^M(Reading database .. . 199432 files and directories currently installed.)^M
Preparing to unpack .../php5-common_5.5.9+dfsg-1ubuntu4.4_i386.deb ...^M
Unpacking php5-common (5.5.9+dfsg-1ubuntu4.4) ...^M
dpkg: error processing archive /var/cache/apt/archives/php5-common_5.5.9+dfsg-1ubuntu4.4_i386.deb (--unpack):^M
 unable to make backup symlink for `./usr/sbin/php5dismod': No such file or directory^M
Preparing to unpack .../php5-cli_5.5.9+dfsg-1ubuntu4.4_i386.deb ...^M
Unpacking php5-cli (5.5.9+dfsg-1ubuntu4.4) ...^M
dpkg: error processing archive /var/cache/apt/archives/php5-cli_5.5.9+dfsg-1ubuntu4.4_i386.deb (--unpack):^M
 unable to make backup symlink for `./usr/share/doc/php5-cli': No such file or directory^M
Preparing to unpack .../php5-gd_5.5.9+dfsg-1ubuntu4.4_i386.deb ...^M
Unpacking php5-gd (5.5.9+dfsg-1ubuntu4.4) ...^M
dpkg: error processing archive /var/cache/apt/archives/php5-gd_5.5.9+dfsg-1ubuntu4.4_i386.deb (--unpack):^M
 unable to make backup symlink for `./usr/share/doc/php5-gd': No such file or directory^M
Preparing to unpack .../php5-readline_5.5.9+dfsg-1ubuntu4.4_i386.deb ...^M
Unpacking php5-readline (5.5.9+dfsg-1ubuntu4.4) ...^M
dpkg: error processing archive /var/cache/apt/archives/php5-readline_5.5.9+dfsg-1ubuntu4.4_i386.deb (--unpack):^M
 unable to make backup symlink for `./usr/share/doc/php5-readline': No such file or directory^M
Processing triggers for man-db (2.6.7.1-1) ...^M
Errors were encountered while processing:^M
 /var/cache/apt/archives/php5-common_5.5.9+dfsg-1ubuntu4.4_i386.deb^M
 /var/cache/apt/archives/php5-cli_5.5.9+dfsg-1ubuntu4.4_i386.deb^M
 /var/cache/apt/archives/php5-gd_5.5.9+dfsg-1ubuntu4.4_i386.deb^M
 /var/cache/apt/archives/php5-readline_5.5.9+dfsg-1ubuntu4.4_i386.deb^M
Log ended: 2014-09-13 21:34:18

#################
$ ubuntu-support-status --show-unsupported
Support status summary of 'ubuntu':

You have 4 packages (0.2%) supported until June 2015 (9m)
You have 21 packages (1.1%) supported until February 2015 (9m)
You have 1741 packages (95.3%) supported until May 2019 (5y)
You have 35 packages (1.9%) supported until May 2017 (3y)

You have 0 packages (0.0%) that can not/no-longer be downloaded
You have 26 packages (1.4%) that are unsupported

No longer downloadable:

Unsupported:
flashplugin-installer freepats gstreamer0.10-fluendo-mp3
gstreamer0.10-plugins-bad gstreamer1.0-fluendo-mp3
gstreamer1.0-plugins-bad gstreamer1.0-plugins-bad-faad
gstreamer1.0-plugins-bad-videoparsers gstreamer1.0-plugins-ugly htop
iotop libgme0 libgstreamer-plugins-bad0.10-0
libgstreamer-plugins-bad1.0-0 libmimic0 libnspr4-0d liboil0.3
libwildmidi-config libwildmidi1 libzbar0 lm-sensors
phoronix-test-suite python3-checkbox smem sysbench
ubuntu-restricted-addons

################# NO OUTPUT
$ cat: /etc/dpkg/dpkg.cfg.d/multiarch: No such file or directory
$ dpkg --print-foreign-architectures
$ sudo grep -R proxy /etc/apt/*
$ grep proxy /etc/environment
$ echo $http_proxy
$ echo $ftp_proxy
$ grep proxy /etc/bash.bashrc
$ grep proxy ~/.bashrc
$ cat: /etc/apt/apt.conf: No such file or directory
$ sudo fuser -vvv /var/lib/dpkg/lock
$ sudo fuser -vvv /var/cache/apt/archives/lock

#################
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"

#################
$ uname -a
Linux ubuntu 3.13.0-35-generic #62-Ubuntu SMP Fri Aug 15 01:58:01 UTC 2014 i686 i686 i686 GNU/Linux

################# EMPTY FILES
/var/lib/apt/lists/lock
/var/cache/apt/archives/lock
/var/lib/dpkg/lock

################# DONE
sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status || sudo cp /var/backups/apt.extended_states.0 /var/lib/dpkg/status
sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sudo rm -rf /var/lib/dpkg/updates/*
sudo rm -rf /var/lib/apt/lists
sudo rm /var/cache/apt/*.bin
sudo mkdir /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists/partial
LANG=C;sudo apt-get clean

#################
$ LANG=C;sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done

#################
$ LANG=C;sudo apt-get --purge autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 phoronix-test-suite : Depends: php5-cli but it is not installable
                       Depends: php5-gd but it is not installable
 php5-json : Depends: phpapi-20121212+lfs but it is not installable
E: Unmet dependencies. Try using -f.

#################
$ LANG=C;sudo apt-get --fix-missing update -o APT::Cache-Limit=100000000
Ign http://archive.ubuntu.com trusty InRelease
...
Reading package lists... Done

#################
$ sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of php5-json:
 php5-json depends on phpapi-20121212+lfs; however:
  Package phpapi-20121212+lfs is not installed.

dpkg: error processing package php5-json (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of phoronix-test-suite:
 phoronix-test-suite depends on php5-cli; however:
  Package php5-cli is not installed.
 phoronix-test-suite depends on php5-gd; however:
  Package php5-gd is not installed.

dpkg: error processing package phoronix-test-suite (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 php5-json
 phoronix-test-suite

#################
$ sudo dpkg --clear-avail

#################
$ LANG=C;sudo apt-get -f install

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  php5-cli php5-common php5-gd php5-readline
Suggested packages:
  php-pear php5-user-cache
The following NEW packages will be installed:
  php5-cli php5-common php5-gd php5-readline
0 upgraded, 4 newly installed, 0 to remove and 2 not upgraded.
2 not fully installed or removed.
Need to get 2,634 kB of archives.
After this operation, 10.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.ubuntu.com/ubuntu/ trusty-updates/main php5-common i386 5.5.9+dfsg-1ubuntu4.4 [441 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ trusty-updates/main php5-cli i386 5.5.9+dfsg-1ubuntu4.4 [2,155 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ trusty-updates/main php5-gd i386 5.5.9+dfsg-1ubuntu4.4 [26.2 kB]
Get:4 http://archive.ubuntu.com/ubuntu/ trusty-updates/main php5-readline i386 5.5.9+dfsg-1ubuntu4.4 [11.7 kB]
Fetched 2,634 kB in 46s (56.6 kB/s)
(Reading database ... 199429 files and directories currently installed.)
Preparing to unpack .../php5-common_5.5.9+dfsg-1ubuntu4.4_i386.deb ...
Unpacking php5-common (5.5.9+dfsg-1ubuntu4.4) ...
dpkg: error processing archive /var/cache/apt/archives/php5-common_5.5.9+dfsg-1ubuntu4.4_i386.deb (--unpack):
 unable to make backup symlink for `./usr/sbin/php5dismod': No such file or directory
No apport report written because the error message indicates an issue on the local system
                                                                                         Preparing to unpack .../php5-cli_5.5.9+dfsg-1ubuntu4.4_i386.deb ...
Unpacking php5-cli (5.5.9+dfsg-1ubuntu4.4) ...
dpkg: error processing archive /var/cache/apt/archives/php5-cli_5.5.9+dfsg-1ubuntu4.4_i386.deb (--unpack):
 unable to make backup symlink for `./usr/share/doc/php5-cli': No such file or directory
No apport report written because the error message indicates an issue on the local system
                                                                                         Preparing to unpack .../php5-gd_5.5.9+dfsg-1ubuntu4.4_i386.deb ...
Unpacking php5-gd (5.5.9+dfsg-1ubuntu4.4) ...
dpkg: error processing archive /var/cache/apt/archives/php5-gd_5.5.9+dfsg-1ubuntu4.4_i386.deb (--unpack):
 unable to make backup symlink for `./usr/share/doc/php5-gd': No such file or directory
No apport report written because the error message indicates an issue on the local system
                                                                                         Preparing to unpack .../php5-readline_5.5.9+dfsg-1ubuntu4.4_i386.deb ...
Unpacking php5-readline (5.5.9+dfsg-1ubuntu4.4) ...
dpkg: error processing archive /var/cache/apt/archives/php5-readline_5.5.9+dfsg-1ubuntu4.4_i386.deb (--unpack):
 unable to make backup symlink for `./usr/share/doc/php5-readline': No such file or directory
No apport report written because MaxReports is reached already
                                                              Processing triggers for man-db (2.6.7.1-1) ...
Errors were encountered while processing:
 /var/cache/apt/archives/php5-common_5.5.9+dfsg-1ubuntu4.4_i386.deb
 /var/cache/apt/archives/php5-cli_5.5.9+dfsg-1ubuntu4.4_i386.deb
 /var/cache/apt/archives/php5-gd_5.5.9+dfsg-1ubuntu4.4_i386.deb
 /var/cache/apt/archives/php5-readline_5.5.9+dfsg-1ubuntu4.4_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

#################
$ LANG=C;sudo apt-get --fix-missing install

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 phoronix-test-suite : Depends: php5-cli but it is not installed
                       Depends: php5-gd but it is not installed
 php5-json : Depends: phpapi-20121212+lfs
E: Unmet dependencies. Try using -f.

#################
$ LANG=C;sudo apt-get update -o APT::Cache-Limit=100000000 && sudo apt-get dist-upgrade

...
Fetched 59.7 kB in 29s (2,013 B/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 phoronix-test-suite : Depends: php5-cli but it is not installed
                       Depends: php5-gd but it is not installed
 php5-json : Depends: phpapi-20121212+lfs
E: Unmet dependencies. Try using -f.

#################
$ find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;

/etc/apt/sources.list

     1 # deb cdrom:[Ubuntu 14.04 LTS _Trusty Tahr_ - Release i386 (20140417)]/ 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://archive.ubuntu.com/ubuntu trusty main restricted
     6 deb-src http://archive.ubuntu.com/ubuntu trusty main restricted
     7
     8 ## Major bug fix updates produced after the final release of the
     9 ## distribution.
    10 deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted
    11 deb-src http://archive.ubuntu.com/ubuntu trusty-updates main restricted
    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://archive.ubuntu.com/ubuntu trusty universe
    17 deb-src http://archive.ubuntu.com/ubuntu trusty universe
    18 deb http://archive.ubuntu.com/ubuntu trusty-updates universe
    19 deb-src http://archive.ubuntu.com/ubuntu trusty-updates universe
    20
    21 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    22 ## team, and may not be under a free licence. Please satisfy yourself as to
    23 ## your rights to use the software. Also, please note that software in
    24 ## multiverse WILL NOT receive any review or updates from the Ubuntu
    25 ## security team.
    26 deb http://archive.ubuntu.com/ubuntu trusty multiverse
    27 deb-src http://archive.ubuntu.com/ubuntu trusty multiverse
    28 deb http://archive.ubuntu.com/ubuntu trusty-updates multiverse
    29 deb-src http://archive.ubuntu.com/ubuntu trusty-updates multiverse
    30
    31 ## N.B. software from this repository may not have been tested as
    32 ## extensively as that contained in the main release, although it includes
    33 ## newer versions of some applications which may provide useful features.
    34 ## Also, please note that software in backports WILL NOT receive any review
    35 ## or updates from the Ubuntu security team.
    36 deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse
    37 deb-src http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse
    38
    39 deb http://archive.ubuntu.com/ubuntu trusty-security main restricted
    40 deb-src http://archive.ubuntu.com/ubuntu trusty-security main restricted
    41 deb http://archive.ubuntu.com/ubuntu trusty-security universe
    42 deb-src http://archive.ubuntu.com/ubuntu trusty-security universe
    43 deb http://archive.ubuntu.com/ubuntu trusty-security multiverse
    44 deb-src http://archive.ubuntu.com/ubuntu trusty-security multiverse
    45
    46 ## Uncomment the following two lines to add software from Canonical's
    47 ## 'partner' repository.
    48 ## This software is not part of Ubuntu, but is offered by Canonical and the
    49 ## respective vendors as a service to Ubuntu users.
    50 deb http://archive.canonical.com/ubuntu trusty partner
    51 deb-src http://archive.canonical.com/ubuntu trusty partner
    52
    53 ## Uncomment the following two lines to add software from Ubuntu's
    54 ## 'extras' repository.
    55 ## This software is not part of Ubuntu, but is offered by third-party
    56 ## developers who want to ship their latest software.
    57 # deb http://extras.ubuntu.com/ubuntu trusty main
    58 # deb-src http://extras.ubuntu.com/ubuntu trusty main

Question information

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

Hmmmm. Try:

cd /
sudo apt-get -f install

Is it ok?

Revision history for this message
Gayan Weerakutti (reversiblean) said :
#2

actionparsnip (andrew-woodhead666):
Nope it didin't work. Output for 'sudo apt-get -f install' is included in my above post.

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

I suggest you report a bug against the phoronix test suite

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

What is the output of
ls -la /usr
ls -la /usr/sbin

Revision history for this message
Gayan Weerakutti (reversiblean) said :
#5

Finally got it to work! Have to find all the unmet dependencies and their parents, and purge them at once.