LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 01-01-2018, 12:52 AM   #1
FrizzledOldButt
Member
 
Registered: Dec 2015
Posts: 129

Rep: Reputation: Disabled
apt-get dpkg corruption issues


On a headless Ubuntu 16.04 machine I'm running I have increasing package corruption issues that I cannot resolve.

Similar issues are reported elsewhere but solutions offered are not working. The most common recommendation is to try apt-get clean and apt-get install -f. It's not helping.

I have tried manually cleaning out /var/cache/apt/archives, without luck.

Today the problem got even more severe, with the message
Code:
dpkg-deb (subprocess): decompressing archive member: internal bzip2 read error: 'DATA_ERROR'
Again, solutions offered at various places did not help.

Now when I try
Code:
sudo apt-get clean 
sudo apt-get install -f

I get
Code:
Unpacking linux-image-4.4.0-104-generic (4.4.0-104.127) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-104-generic_4.4.0-104.127_amd64.deb (--unpack):
 corrupted filesystem tarfile - corrupted package archive
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-104-generic /boot/vmlinuz-4.4.0-104-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-104-generic /boot/vmlinuz-4.4.0-104-generic
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-4.4.0-104-generic_4.4.0-104.127_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
user@server:/var/cache/apt/archives$ ls
Short of a rebuild, anyone have a suggestion for a quicker fix that might work?

Thanks
 
Old 01-01-2018, 03:22 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
the 2 problems displayeed seem to be about bzip2 and tar, and have nothing to do with apt or dpkg.
maybe you should try to confirm that theory.
maybe you can reproduce bzip and tar errors without apt?
maybe you can check all files in /var/cache/apt/archives for errors, again without apt or dpkg?
maybe your /var is on a separate partition, and the whole partition is failing?
 
Old 01-01-2018, 08:11 AM   #3
FrizzledOldButt
Member
 
Registered: Dec 2015
Posts: 129

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
the 2 problems displayeed seem to be about bzip2 and tar, and have nothing to do with apt or dpkg.
maybe you should try to confirm that theory.
Whatever I try with apt-get or dpkg now returns something like

Quote:
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
linux-image-extra-4.4.0-104-generic : Depends: linux-image-4.4.0-104-generic but it is not going to be installed
linux-image-generic : Depends: linux-image-4.4.0-104-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
So I don't seem to be able remove, purge, install etc.


Quote:
maybe you can reproduce bzip and tar errors without apt?
They seem to be working OK. No errors archiving and extraction other general files.

Quote:
maybe your /var is on a separate partition, and the whole partition is failing?
It's in the main partition. I had already checked the HDD, a 1T Seagate unit about 18 months old using a rescue boot disk. The disk utilities tell me everything is OK.

I'll re-install the OS during the next 24 hours.

Thanks
 
Old 01-05-2018, 10:38 AM   #4
Stev8
Member
 
Registered: Mar 2012
Location: Hamilton, Ontario
Distribution: Ubuntu 17.10 64 bit
Posts: 113

Rep: Reputation: Disabled
Hello

I think you have unmet dependancies which causes a cascade of issues.

If you can somehoe do it, install the synaptic package manager remove your unmet dependancies. Thats as far as i understand about dpkg corruption.

Last edited by Stev8; 01-05-2018 at 10:40 AM.
 
Old 01-05-2018, 04:56 PM   #5
FrizzledOldButt
Member
 
Registered: Dec 2015
Posts: 129

Original Poster
Rep: Reputation: Disabled
Hi all,
Thanks for the replies. @ondoho hinted about /var being in a separate partition. It isn't but the problem did track down to a partition on the PC, which is used as file server. It had LVM array of 6 x 2T WD drives. On closer inspection SMART reported one of the drives on it's way to WD heaven. I unmounted the LVM array and voila, sudo apt-get install -f worked!!?? I mounted the array and tried sudo apt-get install -f again. It failed as before.

I'm sure there is an explanation why a faulty drive in an LVM would affect the OS on the boot drive, but suffice that removing the HDD reported by SMART out of the array fixed things.

Cheers

Last edited by FrizzledOldButt; 01-05-2018 at 04:58 PM.
 
2 members found this post helpful.
  


Reply

Tags
apt-get update



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apt-get dpkg error 5%dpkg akhund_bilal Debian 17 01-16-2022 08:25 PM
APT/dpkg errors! /var/lib/dpkg/status bassclarinet Debian 16 12-01-2011 09:24 AM
[SOLVED] DPKG/apt-get broken - GLIBC_2.6 not found (required by dpkg) Alize Linux - Software 15 05-23-2011 04:25 AM
Console-* issues with dpkg/apt-get FuhrerDS Debian 1 02-20-2005 03:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 01:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration