Results 1 to 15 of 15

Thread: apt-get error - E: Unable to locate package linux-headers-4.6.0-kali1-amd64

  1. #1
    Join Date
    2016-Dec
    Posts
    2

    apt-get error - E: Unable to locate package linux-headers-4.6.0-kali1-amd64

    Hello,

    First a little background:
    I have Kali installed on my internal HDD of a Dell Latitude E4310 laptop.

    lsb_release -a output:
    Code:
    No LSB modules are available.
    Distributor ID:	Kali
    Description:	Kali GNU/Linux Rolling
    Release:	kali-rolling
    Codename:	kali-rolling

    uname -r output:
    Code:
    4.6.0-kali1-amd64

    Now my current problem:
    apt-get install linux-headers-$(uname -r) output:
    Code:
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    E: Unable to locate package linux-headers-4.6.0-kali1-amd64
    E: Couldn't find any package by glob 'linux-headers-4.6.0-kali1-amd64'
    E: Couldn't find any package by regex 'linux-headers-4.6.0-kali1-amd64'

    I've also tried the following packages which I can't get installed either:

    apt-get install linux-headers output:
    Code:
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Package linux-headers is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    
    E: Package 'linux-headers' has no installation candidate

    apt-get install linux-headers-generic output:
    Code:
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Package linux-headers-generic is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    
    E: Package 'linux-headers-generic' has no installation candidate

    apt-get install base-devel output:
    Code:
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    E: Unable to locate package base-devel

    My current /etc/apt/sources.list file:
    Code:
    # 
    
    # deb cdrom:[Debian GNU/Linux 2016.1 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20160830-11:29]/ kali-rolling contrib main non-free
    
    #deb cdrom:[Debian GNU/Linux 2016.1 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20160830-11:29]/ kali-rolling contrib main non-free
    
    deb http://http.kali.org/kali kali-rolling main non-free contrib
    deb-src http://http.kali.org/kali kali-rolling main non-free contrib

    It's basically the sources.list file that came with Kali except I uncommented the last line.

    I've also tried the sources.list files at
    https://forums.kali.org/showthread.p...ository-Issues
    http://docs.kali.org/general-use/kal...t-repositories

    And I have tried so many other/different source.list files out there it's not even funny. And yes, I always run apt-get update in between each sources.list change.


    Next, apt-cache search outputs:

    apt-cache search linux-headers-$(uname -r)
    Code:
    <nothing - there was no output...just gave me the command prompt>

    apt-cache search linux-headers
    Code:
    aufs-dkms - DKMS files to build and install aufs
    linux-headers-4.8.0-kali2-all - All header files for Linux 4.8 (meta-package)
    linux-headers-4.8.0-kali2-all-amd64 - All header files for Linux 4.8 (meta-package)
    linux-headers-4.8.0-kali2-amd64 - Header files for Linux 4.8.0-kali2-amd64
    linux-headers-4.8.0-kali2-common - Common header files for Linux 4.8.0-kali2
    linux-headers-4.8.0-kali2-common-rt - Common header files for Linux 4.8.0-kali2-rt
    linux-headers-4.8.0-kali2-rt-amd64 - Header files for Linux 4.8.0-kali2-rt-amd64
    linux-headers-amd64 - Header files for Linux amd64 configuration (meta-package)
    linux-headers-rt-amd64 - Header files for Linux rt-amd64 configuration (meta-package)
    linux-libc-dev-alpha-cross - Linux Kernel Headers for development (for cross-compiling)
    linux-libc-dev-arm64-cross - Linux Kernel Headers for development (for cross-compiling)
    linux-libc-dev-armel-cross - Linux Kernel Headers for development (for cross-compiling)
    linux-libc-dev-armhf-cross - Linux Kernel Headers for development (for cross-compiling)
    linux-libc-dev-hppa-cross - Linux Kernel Headers for development (for cross-compiling)
    linux-libc-dev-m68k-cross - Linux Kernel Headers for development (for cross-compiling)
    linux-libc-dev-mips-cross - Linux Kernel Headers for development (for cross-compiling)
    linux-libc-dev-mips64-cross - Linux Kernel Headers for development (for cross-compiling)
    linux-libc-dev-mips64el-cross - Linux Kernel Headers for development (for cross-compiling)
    linux-libc-dev-mipsel-cross - Linux Kernel Headers for development (for cross-compiling)
    linux-libc-dev-powerpc-cross - Linux Kernel Headers for development (for cross-compiling)
    linux-libc-dev-powerpcspe-cross - Linux Kernel Headers for development (for cross-compiling)
    linux-libc-dev-ppc64-cross - Linux Kernel Headers for development (for cross-compiling)
    linux-libc-dev-ppc64el-cross - Linux Kernel Headers for development (for cross-compiling)
    linux-libc-dev-s390x-cross - Linux Kernel Headers for development (for cross-compiling)
    linux-libc-dev-sh4-cross - Linux Kernel Headers for development (for cross-compiling)
    linux-libc-dev-sparc64-cross - Linux Kernel Headers for development (for cross-compiling)

    apt-cache search linux-headers-generic
    Code:
    <nothing - there was no output...just gave me the command prompt>

    apt-cache search base-devel
    Code:
    <nothing - there was no output...just gave me the command prompt>


    The funny (actually it's not funny...it's frustrating) thing is is that this isn't even my main problem. The reason I'm doing this is because I'm trying to install the drivers for my new USB Wireless NIC, the Alfa AWUS036AC. The 'make' step is giving me some errors which after searching it sounds like I need to install linux headers, which is what I've been trying to do for days. I've been spending hours almost every day for about a week trying to get the thing working.

    Output of make:
    Code:
    make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.6.0-kali1-amd64/build M=/root/Downloads/rtl8812AU_8821AU_linux  modules
    make[1]: *** /lib/modules/4.6.0-kali1-amd64/build: No such file or directory.  Stop.
    Makefile:1570: recipe for target 'modules' failed
    make: *** [modules] Error 2
    And no, I do not have a file or directory named 'build' at that location, but had a feeling that there's more to it than that, so started searching and that's why I started trying to install linux headers.

    I found the drivers from: https://github.com/abperiasamy/rtl8812AU_8821AU_linux

    Why am I installing drivers for it? Because the new USB Wireless NIC I recently bought was not plugging-and-playing. lsusb output:
    Code:
    Bus 002 Device 004: ID 0a5c:5800 Broadcom Corp. BCM5880 Secure Applications Processor
    Bus 002 Device 003: ID 413c:8187 Dell Computer Corp. DW375 Bluetooth Module
    Bus 002 Device 005: ID 0bda:8812 Realtek Semiconductor Corp. RTL8812AU 802.11a/b/g/n/ac WLAN Adapter
    Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 001 Device 003: ID 0461:4db1 Primax Electronics, Ltd 
    Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    3rd device down (the Realtek) is the one. Anyway, it feels like I keep going backwards further and further and am going crazy here.

    I'm not sure what else is relevant as far as information about my 'setup', so am ending this post here. I am not a Linux guy so maybe this is an easy/stupid problem. If there's more information needed from me, just let me know and I'll get it (if I actually know how).

  2. #2
    Join Date
    2014-Feb
    Posts
    309
    You need to upgrade your kernel to the latest (which is 4.8) and then linux-headers-$(uname -r) will work; due to the way kali-rolling moves faster, the 4.6 headers are no longer in the repository.

    apt-get dist-upgrade
    <reboot as long as there were no issues updating to be using the 4.8 kernel>
    apt-get install linux-headers-$(uname -r)

  3. #3
    Join Date
    2016-Oct
    Location
    /dev/sda
    Posts
    1,012
    As steev said upgrade your kernel to 4.8. Stick with the repositories mentioned in the kali-linux documentation: http://docs.kali.org/general-use/kal...t-repositories

    The Kali Rolling Repository

    kali-rolling is our current active repository since the release of Kali 2016.1. Kali Rolling users are expected to have the following entries in their sources.list:

    deb http://http.kali.org/kali kali-rolling main contrib non-free
    # For source package access, uncomment the following line
    # deb-src http://http.kali.org/kali kali-rolling main contrib non-free

    Any additional repositories added to the Kali sources.list file will most likely BREAK YOUR KALI LINUX INSTALL.

    Before doing this upgrade make sure your sources.list file has same entries as mentioned. Many people forget to insert "hash #" before "deb-src".

  4. #4
    Join Date
    2016-Dec
    Posts
    2
    Thank you steev and _defalt! The

    apt-get dist-upgrade

    did the trick! So I was able to install the drivers after installing the Linux headers!

    (of course now I'm dealing with it not being able to go into monitor mode, but that may be another story for another day)

    Thanks again!

  5. #5
    Join Date
    2017-Jan
    Posts
    1
    I have almost the same problem here, I tried:

    apt-get update
    apt-get dist-upgrade

    several times already...

    but still uname-r shows:

    4.6.0-kali1-amd64

    sources.list looks like this:

    Quote Originally Posted by Code
    deb http://http.kali.org/kali kali-rolling main contrib non-free
    #deb-src http://http.kali.org/kali kali-rolling main contrib non-free


    Now I have tried running:

    dpkg --list | grep linux-image

    and i get the following output:

    Quote Originally Posted by Code
    ii linux-image-4.6.0-kali1-amd64 4.6.4-1kali1 amd64 Linux 4.6 for 64-bit PCs
    ii linux-image-4.8.0-kali2-amd64 4.8.15-1kali1 amd64 Linux 4.8 for 64-bit PCs
    ii linux-image-amd64 4.8+77+kali1 amd64 Linux for 64-bit PCs (meta-package)
    Does that mean that install packages are there but are not installing somehow?

    Thank you in advance

  6. #6
    Join Date
    2016-Oct
    Location
    /dev/sda
    Posts
    1,012
    Quote Originally Posted by edumugi View Post
    I have almost the same problem here, I tried:

    apt-get update
    apt-get dist-upgrade

    several times already...

    but still uname-r shows:

    4.6.0-kali1-amd64
    After apt-get update and apt-get dist-upgrade, enter apt-get upgrade.

  7. #7
    Join Date
    2017-Jan
    Posts
    4
    hello,

    i has same trouble with topicstarter.

    kali 2016.2(32 bit) was downloaded from this site.

    uname -r show 4.6.0 version
    apt-get update + upgrade + dist-upgrade was maked with repositories from kali docs

    Code:
    deb http://http.kali.org/kali kali-rolling main non-free contrib
    deb-src http://http.kali.org/kali kali-rolling main non-free contrib
    apt-cache search linux-headers show me that i have linux-headers-4.8.0 and i put manually install it by typing
    apt-get install linux-headers-4.8.0...

    there is no error messages before\after reboot but uname -r still show 4.6.0 version.

    all this actions need to install nvidia driver and use my GPU fro pyrit.

    so i dunno must i try to go same way with nvidia driver or i must i try to find another way...?
    any solution?

  8. #8
    Join Date
    2016-Oct
    Location
    /dev/sda
    Posts
    1,012
    To sdbg,
    Uncomment the second repository in your sources.list file by inserting hash # before deb-src. It should be # deb-src....

  9. #9
    Join Date
    2017-Jan
    Posts
    4
    Quote Originally Posted by _defalt View Post
    To sdbg,
    Uncomment the second repository in your sources.list file by inserting hash # before deb-src. It should be # deb-src....
    already try this way too.
    nothing changes - problem still same

  10. #10
    Join Date
    2016-Oct
    Location
    /dev/sda
    Posts
    1,012
    Fix repository like this
    Quote Originally Posted by _defalt View Post
    Uncomment the second repository in your sources.list file by inserting hash # before deb-src. It should be # deb-src....
    Run sudo apt-cache clean && sudo apt-get update && sudo apt-get dist-upgrade

  11. #11
    Join Date
    2014-Feb
    Posts
    309
    Quote Originally Posted by domiflichi View Post
    Thank you steev and _defalt! The


    apt-get dist-upgrade


    did the trick! So I was able to install the drivers after installing the Linux headers!


    (of course now I'm dealing with it not being able to go into monitor mode, but that may be another story for another day)


    Thanks again!

    No problem. The reason monitor mode doesn't work, is the driver is not patched for monitor mode. You'll need to look into doing it yourself, or (preferably) get a wireless card that is considered "supported" for monitor mode.

  12. #12
    Join Date
    2017-Jan
    Posts
    4
    Quote Originally Posted by _defalt View Post
    Fix repository like this


    Run sudo apt-cache clean && sudo apt-get update && sudo apt-get dist-upgrade


    nothing changes
    Last edited by sdbg; 2017-01-07 at 11:44.

  13. #13
    Join Date
    2016-Oct
    Location
    /dev/sda
    Posts
    1,012
    sdbg,
    Here is my output of sources.list file:
    cat /etc/apt/sources.list

    #

    # deb cdrom:[Debian GNU/Linux 2016.1 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20160830-11:29]/ kali-rolling contrib main non-free

    #deb cdrom:[Debian GNU/Linux 2016.1 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20160830-11:29]/ kali-rolling contrib main non-free

    deb http://http.kali.org/kali kali-rolling main contrib non-free

    #deb-src http://http.kali.org/kali kali main non-free contrib
    Copy it and try again.

  14. #14
    Join Date
    2016-Oct
    Posts
    4
    Quote Originally Posted by _defalt View Post
    sdbg,
    Here is my output of sources.list file:


    Copy it and try again.
    Hey,
    I have the exact same problem and none of this has helped solve it. I've tried two fresh installations of kali full and kali light. My uname -r output is always the 4.6.0 kernel and I can't find the appropriate headers anywhere. The system shows that I also have 4.9.0 kernel and headers installed but it keeps using the 4.6.0 image for some reason. Removing the 4.6.0 image obviously results in a broken system. Everything is up to date, my sources list is the official repo as suggested but I can't get the **** headers or change the image so I can't run my VMs until then....
    I'd appreciate some extra input.

  15. #15
    Join Date
    2016-Oct
    Location
    /dev/sda
    Posts
    1,012
    Quote Originally Posted by Lodos View Post
    Hey,
    I have the exact same problem and none of this has helped solve it. I've tried two fresh installations of kali full and kali light. My uname -r output is always the 4.6.0 kernel and I can't find the appropriate headers anywhere. The system shows that I also have 4.9.0 kernel and headers installed but it keeps using the 4.6.0 image for some reason. Removing the 4.6.0 image obviously results in a broken system. Everything is up to date, my sources list is the official repo as suggested but I can't get the **** headers or change the image so I can't run my VMs until then....
    I'd appreciate some extra input.
    Install weekly image of kali. It is the latest weekly version released by offensive security every week. http://cdimage.kali.org/kali-images/kali-weekly/

Similar Threads

  1. Unable to locate package linux-headers-5.4.0-kali2-amd64
    By pscretn in forum Community Feedback
    Replies: 0
    Last Post: 2020-06-12, 15:32
  2. Unable to locate package linux-headers-4.18.0-kali2-amd64
    By NomanProdhan in forum General Archive
    Replies: 6
    Last Post: 2019-04-03, 05:18
  3. unable to locate package Linux-Headers-4.3.0-Kali1-686-pae
    By Gladiator in forum TroubleShooting Archive
    Replies: 7
    Last Post: 2016-04-09, 14:59

Posting Permissions

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