The package linux-headers-4.4.0-30 needs to be reinstalled, but I can't find an archive for it.

Asked by Simon Baldwin

I am getting this message when I try to update my Ubuntu 16.04 install. It has been working fine since the upgrade. Any idea what this is?

I have tried updating via terminal, software centre and updater. Same result and message. I also tried downloading the package manually and installing it. This didn't work either.

Question information

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

Try:

sudo dpkg -P linux-headers-4.4.0-30
sudo apt-get update
sudo apt-get --reinstall install linux-headers-4.4.0-30

Is that better?

Make sure the file system has free space with:

df -h

Hope that helps.

Revision history for this message
Simon Baldwin (smnbldwn) said :
#2

When I put in sudo dpkg -P linux-headers-4.4.0-30 I get " package is in a very bad inconsistent state; you should
 reinstall it before attempting a removal Errors were encountered while processing: linux-headers-4.4.0-30"

sudo apt-get update works but then sudo apt-get --reinstall install linux-headers-4.4.0-30 gives "The package linux-headers-4.4.0-30 needs to be reinstalled, but I can't find an archive for it."

df -h gives /dev/sda6 425G 167G 237G 42% / for the Ubuntu volume.

Any more ideas?

Thank you!

Revision history for this message
daniel CURTIS (anoda) said :
#3

Hello Simon. Maybe just try to use this command to reinstall linux-headers-4.4.0-30 package (as in your title). Have You tried it?:

$ sudo apt-get install --reinstall package_name

Also please check this website: [1] http://www.ihaveapc.com/2011/10/fix-annoying-the-package-needs-to-be-reinstalled-but-i-cant-find-an-archive-for-it-error-in-linux-mint-ubuntu/

In archive there is not linux-headers-4.4.0-30 package, which needs to be reinstalled. See:

http://security.ubuntu.com/ubuntu/pool/main/l/linux-lts-xenial/

A direct link for a newer one - linux-headers-4.4.0-31-generic is here:

http://security.ubuntu.com/ubuntu/pool/main/l/linux-lts-xenial/linux-headers-4.4.0-31-generic_4.4.0-31.50~14.04.1_amd64.deb

Please note, that second direct link is for amd64 arch! After download proper version, You can try to install .deb package with dpkg(1) command (But You already wrote that You've tried downloading the package manually and installing it, right?):

# installing updated heraders package:
$ sudo dpkg -i linux-headers-4.4.0-31-generic_4.4.0-31.50~14.04.1_amd64.deb

# an old linux_headers .30 version removing, use proper name! (e.g. check 'dpkg -l |grep linux-headers' command)
$ sudo apt-get purge linux-headers linux-headers-4.4.0-30

There is one more command related with problem: "E: The package package name needs to be reinstalled, but I can't find an archive for it."

$ dpkg --remove --force-remove-reinstreq package_name

But, please check [1] link (see above). Best regards.

Revision history for this message
Simon Baldwin (smnbldwn) said :
#4

Thank you Daniel, that worked! I downloaded and installed the new headers and then removed the old one manually using the command you included.

All using the dpkg command.