Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Linux Headers issues

  1. #1
    Join Date
    Nov 2019
    Beans
    4

    Linux Headers issues

    I've been same issues with my system and I can't upgrade as I continually get this error:

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

    even when attempting to reinstall with the following command:
    sudo apt install --reinstall linux-headers-generic

    I continue to get the error above.

    Couple of odd things to note, when I run a list of the packages I get the following:

    dpkg --list | grep linux-image
    ii linux-image-4.4.0-139-generic 4.4.0-139.165 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
    pi linux-image-4.4.0-141-generic 4.4.0-141.167 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
    ii linux-image-extra-4.4.0-139-generic 4.4.0-139.165 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
    pi linux-image-extra-4.4.0-141-generic 4.4.0-141.167 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
    pi linux-image-generic 4.4.0.141.147 amd64 Generic Linux kernel image

    When I run uname -r I get this:
    uname -r
    4.4.0-139-generic


    Anyone have any ideas? I seem to keep going in circles attempting to upgrade but can't reinstall the headers. All insight welcome, thanks in advance.

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Linux Headers issues

    4.4 is from the original 16.04 install. If you aren't tied to it, 4.15 is available and has been for a very long time.

    https://wiki.ubuntu.com/Kernel/LTSEnablementStack

    I'm on this across all my production ubuntu servers and desktops.
    Code:
    ii  linux-image-4.15.0-66-generic               4.15.0-66.75~16.04.1                         amd64        Signed kernel image generic
    ii  linux-image-4.15.0-70-generic               4.15.0-70.79~16.04.1                         amd64        Signed kernel image generic

  3. #3
    Join Date
    Nov 2019
    Beans
    4

    Re: Linux Headers issues

    Thanks for the reply, but it look like something is corrupt in my kernel installation/configuration as even when I attempt to upgrade from the link provided I still get the same error:

    sudo apt-get install --install-recommends linux-generic-hwe-16.04 xserver-xorg-hwe-16.04
    Reading package lists... Done
    Building dependency tree... Done
    E: The package linux-headers-4.4.0-141 needs to be reinstalled, but I can't find an archive for it.

  4. #4
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Linux Headers issues

    Dumb question - did a sudo apt update get run just before?
    Code:
    $ sudo apt search linux-headers-4.4.0-141
    Sorting... Done
    Full Text Search... Done
    linux-headers-4.4.0-141/xenial-updates,xenial-updates,xenial-security,xenial-security 4.4.0-141.167 all
      Header files related to Linux kernel version 4.4.0
    
    linux-headers-4.4.0-141-generic/xenial-updates,xenial-security 4.4.0-141.167 amd64
      Linux kernel headers for version 4.4.0 on 64 bit x86 SMP
    
    linux-headers-4.4.0-141-lowlatency/xenial-updates,xenial-security 4.4.0-141.167 amd64
      Linux kernel headers for version 4.4.0 on 64 bit x86 SMP
    Do you have at least 1 of those repos enabled?

    Do you normally patch weekly? Getting into APT-hell can happen in a few different ways. Patching weekly, avoiding direct .deb file installations, and limiting the use of PPAs to just a few, reputable, PPAs per system is the easiest way to avoid APT issues.
    Even if you do those things perfectly, having versioned backups that you can restore from yesterday, 3 weeks ago, 2 months ago is always helpful. Had a DB get corrupted when a new nextcloud update broken some things. Took me a few weeks to notice, because the core things for which I used nextcloud still worked fine. Anyway, I looked through to changes in the backups to find the DB modification and had to go back 35 days. If I didn't have 90 days of daily, automatic, versioned, backups, I'd have to start all over with nextcloud and the 15 apps installed inside. As it was, it took me a few times to figure out which app had broken things.
    Last edited by TheFu; 3 Weeks Ago at 06:52 PM.

  5. #5
    Join Date
    Mar 2011
    Beans
    1,537

    Re: Linux Headers issues

    4.4.0-141 is a pretty old version. the only reason I can think of using it is the API change which occurred about that time (I thought 142 was the old API, but don't recall). Are you trying to builld a driver which fails with the newer headers?

  6. #6
    Join Date
    Nov 2019
    Beans
    4

    Re: Linux Headers issues

    It's actually kind of strange, I haven't done anything to the system but I keep these errors. I also noticed this when I open software-properties-gtk

    sudo software-properties-gtk

    Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 1171, in detect_drivers
    self.apt_cache = apt.Cache()
    File "/usr/lib/python3/dist-packages/apt/cache.py", line 113, in __init__
    self.open(progress)
    File "/usr/lib/python3/dist-packages/apt/cache.py", line 165, in open
    self._depcache = apt_pkg.DepCache(self._cache)
    SystemError: E:The package linux-headers-4.4.0-141 needs to be reinstalled, but I can't find an archive for it.

    Does seem like there is some type of driver issue that is reliant on those headers but it is in some corrupted state. I also can't view any drivers that installed in the software-properties-gtk UI. Any ideas what I should do at this point? seems like everytime I attempt any type of upgrade or install I get that error (SystemError: E:The package linux-headers-4.4.0-141 needs to be reinstalled, but I can't find an archive for it.)

  7. #7
    Join Date
    Mar 2011
    Beans
    1,537

    Re: Linux Headers issues

    The header package dpkg "actons" are "p" whichis purge. If you had manually deleted some of those files, maybe the purge is getting confused. Manually try a sudo apt-get purge linux-image-generic 4.4.0.141.147 and for any complaints about "missing files" , just use touch to make them (zero length is OK). When you get rid of all the "p" actions, then try an install .

  8. #8
    Join Date
    Nov 2019
    Beans
    4

    Re: Linux Headers issues

    Same thing:

    sudo apt-get purge linux-image-generic 4.4.0.141.147
    Reading package lists... Done
    Building dependency tree... Done
    E: The package linux-headers-4.4.0-141 needs to be reinstalled, but I can't find an archive for it.

  9. #9
    Join Date
    Mar 2011
    Beans
    1,537

    Re: Linux Headers issues

    Confirm that you are running Ubuntu 16.04, and post your /etc/apt/sources.list. Also apt-cache policy linux-headers-4.4.0-141

  10. #10
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Linux Headers issues

    Are these canonical repos in your APT sources?
    xenial-updates,xenial-updates,xenial-security,xenial-security

    BTW, running any GUI program using sudo is a bad idea. Always use sudo -H, if you must.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •