Software-update arrives at a brick wall

10 respostas [Última entrada]
amenex
Desconectado
Joined: 01/03/2015

Every couple of weeks I run software-updater and sudo-apt-get update ... upgrade on a group of desktop PC's that I'm keeping alive, just in case. Today I belatedly discovered that the hard drive on one of them had become so full that it could not be opened. I found that there was trash to be emptied as well as an old trisquel ISO image that could be easily replaced, so I deleted then from that hard drive, releasing nearly 40GB of space. Now it's mountable & readable again.

The need for this maintenance came about because software-updater could not complete its task, with the following bleats of
despair:

E: dpkg was interrupted. You must run dpkg --configure -a to correct the problem.
E: _cache->open failed, please report.

Even after emptying the aforesaid trash, I get the same results.

Worse yet, upon running dpkg --configure -a in Terminal, the terminal begins its tasks and then crashes. Same result before emptying the trash (and rebooting) as after emptying the trash and rebooting. Crashes every time.

Never been in this situation before. Apt has always known exactly what to do to rescue me from my miscues.

Any task that I try with the terminal now is interrupted by the demand that I run dpkg --configure -a.

BTW, the system has plenty of room; that wasn't what had gotten overfull.

George Langford

Magic Banana

I am a member!

I am a translator!

Desconectado
Joined: 07/24/2010

Any broken package? In the "Synaptic Package Manager" (in the "System Settings"), click on the "Custom Filters" button in the lower-left corner of the Synaptic window and then on "Broken" (above). The broken packages will be listed. There should be none. If there are some, try Edit/Fix Broken Packages.

amenex
Desconectado
Joined: 01/03/2015

Back in my "office" ... when I attempted to start Synaptic Package Manager, a popup appeared, saying that an error occurred, and, after stating that E: dpkg was interrupted, demanded that I "run [sudo] dpkg --configure -a to correct the problem."

The popup also said "E: _cache->open() failed, please report."

Using copy & paste into Terminal and adding sudo, I was greeted with a brief flurry of acivity ... poof ... no Terminal.

When I close the popup, Synaptic Package Manager goes down with it. Afterwards, Terminal crashed when I attempted dmesg requests. I rebooted, ran [sudo] dpkg --configure -a again, watched Terminal go poof again, and then restarted terminal, followed by dmesg | tail, which produced what looks like a memory dump:

[QUOTE]
dmesg | tail
[ 52.724371] 01 12 01 03 0e 2f 1e 78 2a 78 f1 a6 55 48 9b 66
[ 52.724376] 22 50 54 bf ef 80 b3 00 01 80 81 40 71 4f 01 01
[ 52.724382] 01 01 01 01 01 01 7c 5e 90 a0 60 1a 1e 40 30 40
[ 52.724387] 36 00 da 28 11 00 00 1a 00 00 00 fd 00 38 4b 1e
[ 52.724393] 51 1e 00 0a 20 20 20 20 20 20 00 00 00 fc 00 53
[ 52.724398] 79 dc 63 9b 61 73 74 65 72 0a 20 20 00 00 00 ff
[ 52.724403] 00 48 39 9e 51 43 30 32 32 36 31 0a 20 20 00 55
[ 54.406428] audit_printk_skb: 27 callbacks suppressed
[ 54.406437] type=1400 audit(1507724080.898:21): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/cups/backend/cups-pdf" pid=1974 comm="apparmor_parser"
[ 54.406457] type=1400 audit(1507724080.898:22): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/cupsd" pid=1974 comm="apparmor_parser"
[/QUOTE]

... which seems irrelevant to the present issue. Is there a more useful form of dmesg ?

Thanks,
George Langford

akito
Desconectado
Joined: 05/10/2017

did you manage to fix this? have you tried redownloading all packages (apt-get clean an upgrading again apt-get update && apt-get upgrade) you can also use the apt-fast to make the download fast unless aria2 cannot be installed

amenex
Desconectado
Joined: 01/03/2015

The "sudo apt-get clean" command was accepted quietly by Terminal, but no reply issued. I next ran sudo apt-get update, which responded ultimately with "run sudo dpkg --configure -a" and when I ran that, another Terminal crash occurred, but I tried again. This time the messages appear to have swallowed the remaining disk space, so the process stopped and I could get the Terminal's output:

[QUOTE]
sudo dpkg --configure -a
Setting up linux-image-3.13.0-132-lowlatency (3.13.0-132.181+7.0trisquel2) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-3.13.0-132-lowlatency
vmlinuz(/boot/vmlinuz-3.13.0-132-lowlatency
) points to /boot/vmlinuz-3.13.0-132-lowlatency
(/boot/vmlinuz-3.13.0-132-lowlatency) -- doing nothing at /var/lib/dpkg/info/linux-image-3.13.0-132-lowlatency.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-132-lowlatency /boot/vmlinuz-3.13.0-132-lowlatency
/etc/kernel/postinst.d/apt-auto-removal: 84: /etc/kernel/postinst.d/apt-auto-removal: cannot create /etc/apt/apt.conf.d//01autoremove-kernels.dpkg-new: No space left on device
run-parts: /etc/kernel/postinst.d/apt-auto-removal exited with return code 2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.13.0-132-lowlatency.postinst line 1025.
dpkg: error processing package linux-image-3.13.0-132-lowlatency (--configure):
subprocess installed post-installation script returned error exit status 2
Setting up samba-common-bin (2:4.3.11+dfsg-0ubuntu0.14.04.12) ...
dpkg: unrecoverable fatal error, aborting:
unable to create `/var/lib/dpkg/updates/tmp.i': No space left on device
[/QUOTE]

This last result has happened before, on another 'puter, and I kept notes ...

Immediately following, I ran dmesg | tail again, with the somewhat more informative results (to you, I hope ...):

[QUOTE]
sudo apt-get update
Hit http://us.archive.trisquel.info belenos InRelease
Hit http://us.archive.trisquel.info belenos-security InRelease
Hit http://us.archive.trisquel.info belenos-updates InRelease
Hit http://us.archive.trisquel.info belenos/main Sources
Hit http://us.archive.trisquel.info belenos/main i386 Packages
Hit http://us.archive.trisquel.info belenos/main Translation-en
Hit http://us.archive.trisquel.info belenos-security/main Sources
Hit http://us.archive.trisquel.info belenos-security/main i386 Packages
Hit http://us.archive.trisquel.info belenos-updates/main Sources
Hit http://us.archive.trisquel.info belenos-updates/main i386 Packages
Ign http://us.archive.trisquel.info belenos/main Translation-en_US
Ign http://us.archive.trisquel.info belenos-security/main Translation-en_US
Ign http://us.archive.trisquel.info belenos-security/main Translation-en
Ign http://us.archive.trisquel.info belenos-updates/main Translation-en_US
Ign http://us.archive.trisquel.info belenos-updates/main Translation-en
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
[redacted]-desktop:~$ sudo dpkg --configure -a
Setting up linux-image-3.13.0-132-lowlatency (3.13.0-132.181+7.0trisquel2) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-3.13.0-132-lowlatency
vmlinuz(/boot/vmlinuz-3.13.0-132-lowlatency
) points to /boot/vmlinuz-3.13.0-132-lowlatency
(/boot/vmlinuz-3.13.0-132-lowlatency) -- doing nothing at /var/lib/dpkg/info/linux-image-3.13.0-132-lowlatency.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-132-lowlatency /boot/vmlinuz-3.13.0-132-lowlatency
/etc/kernel/postinst.d/apt-auto-removal: 84: /etc/kernel/postinst.d/apt-auto-removal: cannot create /etc/apt/apt.conf.d//01autoremove-kernels.dpkg-new: No space left on device
run-parts: /etc/kernel/postinst.d/apt-auto-removal exited with return code 2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.13.0-132-lowlatency.postinst line 1025.
dpkg: error processing package linux-image-3.13.0-132-lowlatency (--configure):
subprocess installed post-installation script returned error exit status 2
Setting up samba-common-bin (2:4.3.11+dfsg-0ubuntu0.14.04.12) ...
dpkg: unrecoverable fatal error, aborting:
unable to create `/var/lib/dpkg/updates/tmp.i': No space left on device
[redacted]-desktop:~$ dmesg | tail
[ 2300.922071] [drm:drm_edid_block_valid] *ERROR* EDID checksum is invalid, remainder is 200
[ 2300.922081] Raw EDID:
[ 2300.922087] 00 ff ff ff ff ff ff 00 4c 2d 7b 03 32 32 51 41
[ 2300.922092] 01 12 01 03 0e 2f 1e 78 2a 78 f1 a6 55 48 9b 26
[ 2300.922097] 12 50 54 3f ef 80 b3 00 81 80 81 80 71 4f 01 01
[ 2300.922102] 01 01 01 01 01 01 fc 2e 10 a0 60 1a 1e 40 30 20
[ 2300.922107] 36 00 da 50 11 00 00 1a 00 00 00 fd 00 38 4b 1e
[ 2300.922112] 51 0e 00 0a 20 20 20 20 40 20 00 00 00 fc 00 53
[ 2300.922118] 79 6e 63 8d 61 f3 74 65 72 0a 20 20 00 00 00 ff
[ 2300.922124] 00 48 39 4e 51 43 30 32 32 36 31 0a 20 20 00 55
[/QUOTE]

I'm sending the quoted material from one 'puter to the other via webmail ...

Thanks
George Langford

Magic Banana

I am a member!

I am a translator!

Desconectado
Joined: 07/24/2010

$ No space left on device

That is the problem. Your root partition is full. It may be because you never remove the older kernels. If so, I suggest you remove, with 'sudo rm file', the older kernels in /boot, but not the one you use: be careful! All the files in /boot that have a version number can be removed except those having the version number that this command returns:
$ uname -r
Then, try again:
$ sudo dpkg --configure -a
Then, remove with the package manager the actual packages that provided the kernels you removed with 'sudo rm' (you can search the installed packages whose name start with "linux-"). If the command above worked, you can use the "Synaptic Package Manager" to do so.

Finally, you can use the "Disk Usage Analyzer", in the "System Settings", to discover what takes most of the space in your root partition (it may not only be the older kernels).

SuperTramp83

I am a translator!

Desconectado
Joined: 10/31/2014

bleachbit is good at freeing space (read the man first)

Magic Banana

I am a member!

I am a translator!

Desconectado
Joined: 07/24/2010

Does it write something on the root partition (in /tmp for instance)? If so, (little) space must first be freed by hand.

amenex
Desconectado
Joined: 01/03/2015

Magic Banana comes to the rescue yet again ...

After spinning my wheels for a while, during which I removed a great many files from /boot, it dawned on me to _read and comprehend_ what Magic Banana wrote, then find the actual installed linux packages (File manager works much better at this than the search function in terminal). I used sudo rm -r [linux ... directory .. 5*] to run through the long list of packages that File Manager found in /usr/src, all the while watching them disappear from File Manager's list. I stopped at rm -r [linux ... directory .. 11*] and that left only the ones in the 120's and 130's.

After rebooting, I ran sudo dpkg --configure -a, then tried Software Updater, which advised me to use sudo apt-get install -f, whereupon a great commotion occurred, after which Software Updater could resume.

Still left in /lib/modprobe.d were nearly forty files of the sort "blacklist_linux_3.13.0-*-lowlatency.conf" and one directory containing the latest blacklist_lunux_3.13.0-133-lowlatency.conf files. I removed the old ones from /lib/modprobe.d.

Software Updater is happy again. Apt works wonders.

Thank you

George Langford

amenex
Desconectado
Joined: 01/03/2015

The same dilemma occurred again ... in March 2018 ... on another computer.
This time, things were so tightly filled up that Icedove wouldn't open,
Software Updater balked, dpkg --configure -a returned a "no space left on
device" error, and the console even crashed when I tried ls on /dev/src.

Then it dawned on me to add |more to my directory listing request: ls |more
which at least let me get the names of the files that I needed to remove from /dev/src:

sudo rm -r linux-headers-3.13.0.10* then
sudo rm -r linux-headers-3.13.0.11*
sudo rm -r linux-headers-3.13.0.12*
sudo rm -r linux-headers-3.13.0.9* and on, down to
sudo rm -r linux-headers-3.13.0.3*

at which point only the needed few files were left in /dev/src

Bear in mind that the asterisk (*) applies to everything at the
location of the * as well to as the characters beyond that position

Then I ran dpkg --configure -a which did its thing happily,
followed by Software Updater, sudo apt-get update, etc. in the console,
and retrieving much mail into Icedove, now working just fine.

George Langford

strypey
Desconectado
Joined: 05/14/2015

I know you said these are legacy computers, and I'm guessing the root partition is quite small? Unless you are desperately short of drive space, I've found a root partition of at least 15-20GB helps to avoid these kinds of space problems (unless there is another issue like cancerous growth of log files due to other errors).