Results 1 to 6 of 6

Thread: linux-headers for 3.4.103 on Banana Pi

  1. #1

    linux-headers for 3.4.103 on Banana Pi

    Hi,
    I installed the Banana Pi image from the OS website. I needed to be able to build some packages so I did sudo apt-get install build-essential and tried to do sudo apt-get install linux-headers-`uname -r`. What I got is this:
    E: Unable to locate package linux-headers-3.4.103
    E: Couldn't find any package by glob 'linux-headers-3.4.103'
    E: Couldn't find any package by regex 'linux-headers-3.4.103'

    I did apt-get update, apt-get upgrade. apt-get dist-upgrade, rebooted, tried again, and still no luck. I also tried putting "3.4.103" explicitly instead of `uname -r`, didn't work.
    When I do
    apt-cache search linux-headers-
    I don't see any 3.4.x versions - the only numbered versions I see are 4.8.0

    My sources list is this:
    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

    I tried to look for solutions, all of them were a mixture of all of the above. I have no additional ideas. If anybody can help, I would really appreciate it.

    Happy new year, everybody!
    MO

  2. #2
    Join Date
    2014-Feb
    Posts
    309
    Quote Originally Posted by moisheoofnik View Post
    Hi,
    I installed the Banana Pi image from the OS website. I needed to be able to build some packages so I did sudo apt-get install build-essential and tried to do sudo apt-get install linux-headers-`uname -r`. What I got is this:
    E: Unable to locate package linux-headers-3.4.103
    E: Couldn't find any package by glob 'linux-headers-3.4.103'
    E: Couldn't find any package by regex 'linux-headers-3.4.103'


    I did apt-get update, apt-get upgrade. apt-get dist-upgrade, rebooted, tried again, and still no luck. I also tried putting "3.4.103" explicitly instead of `uname -r`, didn't work.
    When I do
    apt-cache search linux-headers-
    I don't see any 3.4.x versions - the only numbered versions I see are 4.8.0


    My sources list is this:
    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


    I tried to look for solutions, all of them were a mixture of all of the above. I have no additional ideas. If anybody can help, I would really appreciate it.


    Happy new year, everybody!
    MO



    ARM images are a bit different in that they don't use the typical headers from the linux-headers package.


    Because each ARM board is a special snowflake, they use custom kernels not the default Kali kernel (but they all still have kernel sources injected); Unfortunately, due to a bug in the build scripts I use, they don't currently point to the correct place.


    You will need to go into /lib/modules/3.4.103/ and rm the sources and build symlinks (do NOT use rm -r!) and then run the following 2 commands:


    ln -s /usr/src/kernel build
    ln -s /usr/src/kernel source


    That's it. You should be able to build whatever it is you're trying to build that needs kernel headers, just keep in mind that a lot of ARM boards use older kernels, so whatever driver you are trying to build MAY need some work to be compatible!

  3. #3
    Join Date
    2016-Dec
    Posts
    21
    Stev, is this solution pply to Raspberry Pi 3 also? I have Kali 2.1.2 full on my RPi. I did update, upgrade and dist-upgrade but i'm still have 4.1.19 kernel from March 2016. After apt-cache search linux-headers i can see there is 4.8.x version of kernel. After apt-get install linux-headers-`uname -r` command i get the same error as moisheoofnik...

  4. #4
    Join Date
    2016-Oct
    Location
    /dev/sda
    Posts
    1,012
    Quote Originally Posted by moisheoofnik View Post
    My sources list is this:

    deb-src http://http.kali.org/kali kali-rolling main non-free contrib
    It should be # deb-src http://http.kali.org/kali kali-rolling main contrib non-free

  5. #5
    Join Date
    2016-Dec
    Posts
    21
    Still nothing. I did
    Code:
    rm /lib/modules/4.1.19-v7/build
    rm /lib/modules/4.1.19-v7/source
    ln -sf /usr/src/kernel /lib/modules/4.1.19-v7/build
    ln -sf /usr/src/kernel /lib/modules/4.1.19-v7/source
    My source.list file:
    Code:
    deb http://http.kali.org/kali kali-rolling main non-free contrib
    deb-src http://http.kali.org/kali kali-rolling main contrib non-free
    Then i did:
    Code:
    apt-get install linux-headers-$(uname -r)
    And i get:
    Code:
    E: Unable to locate package linux-headers-4.1.19-v7
    E: Couldn't find any package by glob 'linux-headers-4.1.19-v7'
    E: Couldn't find any package by regex 'linux-headers-4.1.19-v7'

  6. #6
    Join Date
    2014-Feb
    Posts
    309
    Fixing the symlink makes them available. If whatever you're attempting to build is failing, open a thread about that, but we do not use a linux-headers package. The headers exist in /usr/src/kernel because each ARM device uses a custom kernel.

    YOU DO NOT NEED TO INSTALL A LINUX-HEADERS PACKAGE ON ARM, you just need to fix the symlink that is currently broken.

Similar Threads

  1. Kali Linux for Banana Pi M3
    By PadX18 in forum ARM Archive
    Replies: 3
    Last Post: 2018-05-10, 11:56
  2. Replies: 2
    Last Post: 2015-07-09, 20:24

Tags for this Thread

Posting Permissions

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