Packagemanagertroubleshootingprocedure-step-5

Asked by Alex

Original problem in Ubuntu 12.04:

Package manager indicating that apt or unity are constantly running, preventing access to any software sources/managers.

Have executed

sudo killall dpkg

and

 sudo dpkg --configure -a

which resulted in a similar output as that found below, i.e. DKMS: install complete. Terminal freezes in this state, not allowing any other inputs to be executed (cursor does blink)

I have tried the suggestions here:

https://help.ubuntu.com/community/PackageManagerTroubleshootingProcedure

Step 5 in packagemanagertroubleshootingprocedure:

Not all steps were able to be completed. Process stalls after DKMS installation (the original problem which I am trying to resolve). Everything prior to the below input was successful.

"~$ 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.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up bcmwl-kernel-source (6.20.155.1+bdcom-0ubuntu0.0.1) ...
Removing old bcmwl-6.20.155.1+bdcom DKMS files...

-------- Uninstall Beginning --------
Module: bcmwl
Version: 6.20.155.1+bdcom
Kernel: 3.5.0-36-generic (i686)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

wl.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.5.0-36-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall completed.

------------------------------
Deleting module version: 6.20.155.1+bdcom
completely from the DKMS tree.
------------------------------
Done.
Loading new bcmwl-6.20.155.1+bdcom DKMS files...
Building only for 3.5.0-36-generic
Building for architecture i686
Building initial module for 3.5.0-36-generic
Done.

wl:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.5.0-36-generic/updates/dkms/

depmod....

DKMS: install completed."

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
Alex
Solved:
Last query:
Last reply:
Revision history for this message
Alex (kalebka55) said :
#1

I have also tried some suggestions from here

http://askubuntu.com/questions/15433/how-do-i-fix-a-could-not-get-lock-var-lib-dpkg-lock-problem/15469#15469

but still the problem persists.

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

Just telling "Everything prior to the below input was successful" does not help.
The supporters need to see the output of ALL commands in step 5 to be able to help.

Revision history for this message
Alex (kalebka55) said :
#3

Ok, apologies.

Find the output below:

root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/virtualdna# sudo grep -R proxy /etc/apt/*
root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/virtualdna# grep proxy /etc/environment
root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/virtualdna# echo $http_proxy

root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/virtualdna# echo $ftp_proxy

root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/virtualdna# grep proxy /etc/bash.bashrc
root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/virtualdna# grep proxy ~/.bashrc
root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/virtualdna# cat /etc/apt/apt.conf
cat: /etc/apt/apt.conf: No such file or directory
root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/virtualdna# sudo fuser -vvv /var/lib/dpkg/lock
Specified file name /var/lib/dpkg/lock does not exist.
root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/virtualdna# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.2 LTS"
root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/virtualdna# uname -a
Linux virtualdna-HP-Pavilion-dv2000-RL665PA-AB1 3.5.0-36-generic #57~precise1-Ubuntu SMP Thu Jun 20 15:22:35 UTC 2013 i686 athlon i386 GNU/Linux
root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/virtualdna# sudo rm /var/lib/apt/lists/lock
rm: cannot remove `/var/lib/apt/lists/lock': No such file or directory
root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/virtualdna# sudo rm /var/lib/dpkg/lock
rm: cannot remove `/var/lib/dpkg/lock': No such file or directory
root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/virtualdna# sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/virtualdna# sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/virtualdna# sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status || sudo cp /var/backups/apt.extended_states.0 /var/lib/dpkg/status
root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/virtualdna# sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad
root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/virtualdna# sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/virtualdna# sudo rm -rf /var/lib/dpkg/updates/*
root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/virtualdna# sudo rm -rf /var/lib/apt/lists
root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/virtualdna# sudo rm /var/cache/apt/*.bin
rm: cannot remove `/var/cache/apt/*.bin': No such file or directory
root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/virtualdna# sudo mkdir /var/lib/apt/lists
root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/virtualdna# sudo mkdir /var/lib/apt/lists/partial
root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/virtualdna# LANG=C;sudo apt-get clean
root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/
virtualdna# LANG=C;sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/
virtualdna# 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.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up bcmwl-kernel-source (6.20.155.1+bdcom-0ubuntu0.0.1) ...
Removing old bcmwl-6.20.155.1+bdcom DKMS files...

-------- Uninstall Beginning --------
Module: bcmwl
Version: 6.20.155.1+bdcom
Kernel: 3.5.0-36-generic (i686)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

wl.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.5.0-36-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall completed.

------------------------------
Deleting module version: 6.20.155.1+bdcom
completely from the DKMS tree.
------------------------------
Done.
Loading new bcmwl-6.20.155.1+bdcom DKMS files...
Building only for 3.5.0-36-generic
Building for architecture i686
Building initial module for 3.5.0-36-generic
Done.

wl:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.5.0-36-generic/updates/dkms/

depmod....

DKMS: install completed.

Again, the process stops here and does not continue....

Thank you for the quick response.

Revision history for this message
Alex (kalebka55) said :
#4

Trying to open the update manager, I get this response

Software index is broken. It is impossible to install or remove any software. Please use the package manager "Synaptic" or run "sudo apt-get install -f" in a terminal to fix this issue at first.

The

apt-get install -f

command gives this

dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem

Running this command just takes me back to my original problem...

Revision history for this message
N1ck 7h0m4d4k15 (nicktux) said :
#5

Reboot your PC and try again

    sudo apt-get update
    sudo apt-get dist-upgrade

If problem persits, try to purge dkms and see if that helps

    sudo apt-get purge dkms

Regards
 NikTh

Revision history for this message
Alex (kalebka55) said :
#6

Thanks NikTh.

The command

sudo apt-get update

retrieved some packages but then stopped with the message

Fetched 19.7 MB in 25s (761 kB/s)
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

The command

sudo apt-get purge dkms

gives the same output as above.

Revision history for this message
Warren Hill (warren-hill) said :
#8

Typo in my last reply comment #7 ignore. Correct command here
----

OK what do you get if you run the command

sudo dpkg --configure -a

As suggested. Please post all output.

I know it may seem excessive and to be honest a lot of the information will not be relevant to the problem but we are used to long error reports here. The clue that helps us fix your problem could be anywhere in the output.

Revision history for this message
Alex (kalebka55) said :
#9

I appreciate that - it is a matter of laziness on my side...

The output is as follows:

root@virtualdna-HP-Pavilion-dv2000-RL665PA-AB1:/home/virtualdna# sudo dpkg --configure -a
Setting up bcmwl-kernel-source (6.20.155.1+bdcom-0ubuntu0.0.1) ...
Removing old bcmwl-6.20.155.1+bdcom DKMS files...

-------- Uninstall Beginning --------
Module: bcmwl
Version: 6.20.155.1+bdcom
Kernel: 3.5.0-36-generic (i686)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

wl.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.5.0-36-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall completed.

------------------------------
Deleting module version: 6.20.155.1+bdcom
completely from the DKMS tree.
------------------------------
Done.
Loading new bcmwl-6.20.155.1+bdcom DKMS files...
Building only for 3.5.0-36-generic
Building for architecture i686
Building initial module for 3.5.0-36-generic
Done.

wl:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.5.0-36-generic/updates/dkms/

depmod....

DKMS: install completed.

....and stuck (well not stuck but nothing is happening... hard disk not busy, etc.). If I open update manager, it gives an error requiring a partial upgrade. Agreeing to the partial upgrade executes the

dpkg --configure -a

command and the same output is generated. The advantage is that the GUI indicates the activity of the process and the progress bar seems to stall when accessing the cache (somewhere ?).

I hope this helps

Revision history for this message
Alex (kalebka55) said :
#10

Having searched around, I seem to have exhausted any other possibilities. Has anyone any suggestions or theories I could attempt? I may just do a fresh install of the distribution.

Revision history for this message
Alex (kalebka55) said :
#11

I have also increased the cache space limit to 100000000000000 in the event that the cache has exceeded its space limit - but this is unlikely since I clean my system regularly with the bleachbit application.

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

(Problems with hitting the cache size limit usually show error messages that mention the word "cache size", so I doubt if that was the case here.)

It seems to me that you have bcmwl-kernel-source 'not fully installed or removed' in your package management system, and whatever you try with that package ends in a stalled state of the installer with "DKMS: install completed." as last message.

Some ideas:
remove the bcmwl-kernel-source package (sudo dpkg -P bcmwl-kernel-source)
remove the dkms package (already proposed by Nik.Th.; this might also remove some dependent packages)
file system errors (to be checked by fsck)
memory errors (to be ckeched by memtest)

If you do not mind backing up your files and reinstalling your system, that could be the fastest solution, better than chasing errors and their cause and maybe not finding them at all.

Revision history for this message
Alex (kalebka55) said :
#13

Yes, all that you have mentioned is indeed the case. If executing the above commands potentially results in file system errors, I think your final suggestion would be best.

Thanks to all for your help and suggestions.

Kind regards