Unable to install or remove packages

Asked by Shrikar

root@ver-blr-lt1240:/home/shrikar# ubuntu-support-status
Support status summary of 'ver-blr-lt1240':

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

Run with --show-unsupported, --show-supported or --show-all to see more details
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# cat /etc/dpkg/dpkg.cfg.d/multiarch
cat: /etc/dpkg/dpkg.cfg.d/multiarch: No such file or directory
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# dpkg --print-foreign-architectures
i386
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# sudo grep -R proxy /etc/apt/*
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# grep proxy /etc/environment
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# echo $http_proxy

root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# echo $ftp_proxy

root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# grep proxy /etc/bash.bashrc
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# grep proxy ~/.bashrc
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# cat /etc/apt/apt.conf
cat: /etc/apt/apt.conf: No such file or directory
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# sudo fuser -vvv /var/lib/dpkg/lock
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# sudo fuser -vvv /var/cache/apt/archives/lock
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=15.10
DISTRIB_CODENAME=wily
DISTRIB_DESCRIPTION="Ubuntu 15.10"
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# uname -a
Linux ver-blr-lt1240 4.2.0-23-generic #28-Ubuntu SMP Sun Dec 27 17:47:31 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# sudo rm /var/lib/apt/lists/lock
rm: cannot remove ‘/var/lib/apt/lists/lock’: No such file or directory
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# sudo rm /var/cache/apt/archives/lock
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# sudo rm /var/lib/dpkg/lock
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status || sudo cp /var/backups/apt.extended_states.0 /var/lib/dpkg/status
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
cp: cannot stat ‘/var/lib/dpkg/available-old’: No such file or directory
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# sudo rm -rf /var/lib/dpkg/updates/*
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# sudo rm -rf /var/lib/apt/lists
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# sudo rm /var/cache/apt/*.bin
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# sudo mkdir /var/lib/apt/lists
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# sudo mkdir /var/lib/apt/lists/partial
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# LANG=C;sudo apt-get clean
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# LANG=C;sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# sudo dpkg --configure -a
Setting up runit (2.1.2-3ubuntu1) ...
start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
dpkg: error processing package runit (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of git-daemon-run:
 git-daemon-run depends on runit; however:
  Package runit is not configured yet.

dpkg: error processing package git-daemon-run (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 runit
 git-daemon-run
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# sudo dpkg --clear-avail
root@ver-blr-lt1240:/home/shrikar#
root@ver-blr-lt1240:/home/shrikar# LANG=C;sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.2.0-22 linux-headers-4.2.0-22-generic
  linux-image-4.2.0-22-generic linux-image-extra-4.2.0-22-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up runit (2.1.2-3ubuntu1) ...
start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
dpkg: error processing package runit (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of git-daemon-run:No apport report written because the error message indicates its a followup error from a previous failure.

 git-daemon-run depends on runit; however:
  Package runit is not configured yet.

dpkg: error processing package git-daemon-run (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 runit
 git-daemon-run
E: Sub-process /usr/bin/dpkg returned an error code (1)

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

Do you use the system as root? What if you use the OS as intended (as a user) then use sudo as you did above, is the output different?

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#2

Can you help with this problem?

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

To post a message you must log in.