2

I keep getting an error:

E:The package linux-headers-3.5.0-31-generic needs to be reinstalled, but I can't find an archive for it.

I have searched everywhere for this error and how to fix it but since this came up there has been no reference to this anywhere.

Any help please or it will be a complete re-install to get rid of the problem.


# deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/main/binary-i386/
# deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/restricted/binary-i386/
# deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ precise main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://gb.archive.ubuntu.com/ubuntu/ raring main restricted
deb-src http://gb.archive.ubuntu.com/ubuntu/ raring main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://gb.archive.ubuntu.com/ubuntu/ raring-updates main restricted
deb-src http://gb.archive.ubuntu.com/ubuntu/ raring-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://gb.archive.ubuntu.com/ubuntu/ raring universe
deb-src http://gb.archive.ubuntu.com/ubuntu/ raring universe
deb http://gb.archive.ubuntu.com/ubuntu/ raring-updates universe
deb-src http://gb.archive.ubuntu.com/ubuntu/ raring-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://gb.archive.ubuntu.com/ubuntu/ raring multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ raring multiverse
deb http://gb.archive.ubuntu.com/ubuntu/ raring-updates multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ raring-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://gb.archive.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu raring-security main restricted
deb-src http://security.ubuntu.com/ubuntu raring-security main restricted
deb http://security.ubuntu.com/ubuntu raring-security universe
deb-src http://security.ubuntu.com/ubuntu raring-security universe
deb http://security.ubuntu.com/ubuntu raring-security multiverse
deb-src http://security.ubuntu.com/ubuntu raring-security multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu raring main
deb-src http://extras.ubuntu.com/ubuntu raring main
4
  • I think your sources are okay. Really strange. Does an error occur if you type sudo apt-get update ? Have you an idea of something you installed or changed which maybe is causing this? What does apt-cache show linux-headers-generic give you?
    – verpfeilt
    Aug 12, 2013 at 3:03
  • I just think I will wipe the install because it is now becoming a pain having to cancel error report 2 or 3 times an hour and no one appears to know what the issue is. I have another 3 Lenovos all X61s, this one is an X1. However, two of the others now have the same error. Aug 28, 2013 at 12:25
  • I am about to trash my 12.04 LTS now because no one has come up with the answer.... Note I have 3 computers doing this now so it is obviously not an isolated incident..... Oct 31, 2013 at 12:24
  • perhaps related to askubuntu.com/questions/184117/… ?
    – David Cary
    Feb 5, 2014 at 5:17

1 Answer 1

1

Try typing

sudo apt-get install linux-headers-generic

into Terminal and press enter, then input your Password (it won't show on the screen, this is normal) and press enter. This will always install the header you need when your kernel gets an update. This is supposed to be installed by default as far as I know.

6
  • main@ThinkPad-X1:~$ sudo apt-get install linux-headers-generic [sudo] password for main: Reading package lists... Done Building dependency tree Reading state information... Done E: The package linux-headers-3.5.0-31-generic needs to be reinstalled, but I can't find an archive for it. main@ThinkPad-X1:~$ ^C main@ThinkPad-X1:~$ Jul 15, 2013 at 21:22
  • It looks like someone deleted the archive on the web so there is no source for the system to go and get and re-install but won't remove either. Jul 15, 2013 at 21:26
  • It looks like Ubuntu is now dead in the water now. If this problem is not fixable then it is back to Windoze..... Jul 19, 2013 at 9:17
  • 1
    Nah. Even if we would not find any solution to this, you could just reinstall ubuntu. No reason for Windows. Please tell us, which ubuntu version are you using?
    – verpfeilt
    Jul 19, 2013 at 10:48
  • 1
    I am running Ubutu 12.10. I have been using Windoze 7 for the past weeks because have had no time to mess about with this. Aug 7, 2013 at 9:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .