Results 1 to 6 of 6

Thread: Kali 2018 on VirtualBox issue

  1. #1
    Join Date
    2018-Feb
    Posts
    3

    Kali 2018 on VirtualBox issue

    Unable to Install VBoxGuestAdditions_5.2.6

    root@kali:~# cp /media/cdrom/* /root
    root@kali:~# pwd
    /root
    root@kali:~# chmod 755 VBoxLinuxAdditions.run
    root@kali:~# chmod 755 runasroot.sh
    root@kali:~# whoami
    root
    root@kali:~# ./runasroot.sh

    Building the VirtualBox Guest Additions kernel modules.
    This system is currently not set up to build kernel modules.
    Please install the Linux kernel "header" files matching the current kernel for adding new hardware support to the system.
    The distribution packages containing the headers are probably:
    linux-headers-amd64 linux-headers-4.14.0-kali3-amd64

    root@kali:~# sudo apt-get install linux-headers-4.14.0-kali3-amd64

    E: Unable to locate package linux-headers-4.14.0-kali3-amd64

    root@kali:~# sudo apt-get install linux-headers-amd64

    E: Unable to locate package linux-headers-amd64

    Please could https://docs.kali.org/general-use/ka...tual-box-guest be updated ?

  2. #2
    Join Date
    2016-Dec
    Posts
    223
    You should follow the instructions at the top of the page.

    If you really want to do it manually like that, you need to run apt-get update and apt-get dist-upgrade then reboot before running the scripts

  3. #3
    Join Date
    2018-Feb
    Posts
    3

    and then ?

    Quote Originally Posted by Mister_X View Post
    You should follow the instructions at the top of the page.

    If you really want to do it manually like that, you need to run apt-get update and apt-get dist-upgrade then reboot before running the scripts
    root@kali@~# apt-get update
    Reading package lists... Done

    root@kali@~# apt-get dist-upgrade
    Reading package lists... Done
    Building dependency tree
    Reading state information... DOne
    Calculating upgrade... Done
    0 Upgraded, 0 newly installed, 0 to remove and 0 not upgraded

    and then... ?

  4. #4
    Join Date
    2018-Feb
    Location
    Normandy
    Posts
    3
    from Unix Stack Exchange

    On kali linux rolling release the package will be continuously updated , the old package will be removed and replaced by the newest version. on your system you have an old kernel image linux-image-4.12.0-kali1-amd64 , it is no longer available on the kali linux repository , Also its linux-headers-4.12.0-kali1-amd64 will be removed too.
    After the system update (apt update) you can check the available linux-image and linux-headers through:
    apt-cache search linux-image
    apt-cache serach linux-headers
    based on the apt-cache output you can install a specific linux-image and linux-headers package .
    the must important part do not use the apt install linux-headers-$(uname -r) , the uname -r it will point to 4.12.0-kali1-amd64 headers package which it is no longer available it will work after installing a new linux-image and booting the new kernel.
    installing the linux-image and the linux-headers without rebooting , the linux-headers package will be useful after the system reboot.
    apt install linux-image-4.12.0-kali2-amd64
    apt install linux-headers-4.12.0-kali2-amd64
    Or , install the linux-image :
    apt install linux-image-4.12.0-kali2-amd64
    Reboot your system then install the linux-headers:
    apt install linux-headers-$(uname -r)
    now the uname -r should point to the 4.12.0-kali2-amd64 kernel headers version.
    The easy way is to upgarade entirely your system followig those steps:
    apt update
    apt upgrade
    apt dist-upgrade
    reboot
    then install the linux-headers:
    apt install linux-headers-$(uname -r)
    apt autoremove
    The uname -a will display:
    4.13.0-kali1-amd64
    On kali-linux rolling the /etc/apt/sources.list should contain only the following line (kali docs):
    deb http://http.kali.org/kali kali-rolling main contrib non-free

  5. #5
    Join Date
    2016-Dec
    Posts
    223
    Don't install an older version

  6. #6
    Join Date
    2018-Mar
    Posts
    1
    Quote Originally Posted by Nyebodnye View Post
    Unable to Install VBoxGuestAdditions_5.2.6

    root@kali:~# cp /media/cdrom/* /root
    root@kali:~# pwd
    /root
    root@kali:~# chmod 755 VBoxLinuxAdditions.run
    root@kali:~# chmod 755 runasroot.sh
    root@kali:~# whoami
    root
    root@kali:~# ./runasroot.sh

    Building the VirtualBox Guest Additions kernel modules.
    This system is currently not set up to build kernel modules.
    Please install the Linux kernel "header" files matching the current kernel for adding new hardware support to the system.
    The distribution packages containing the headers are probably:
    linux-headers-amd64 linux-headers-4.14.0-kali3-amd64

    root@kali:~# sudo apt-get install linux-headers-4.14.0-kali3-amd64

    E: Unable to locate package linux-headers-4.14.0-kali3-amd64

    root@kali:~# sudo apt-get install linux-headers-amd64

    E: Unable to locate package linux-headers-amd64

    Please could https://docs.kali.org/general-use/ka...tual-box-guest be updated ?
    I had the same issue as you, and even updates/upgrades all told me I was up to date:
    Code:
    root@burtreynolds:~# apt update
    Hit:1 http://archive-7.kali.org/kali kali-rolling InRelease
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    All packages are up to date.
    root@burtreynolds:~# apt dist-upgrade
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Calculating upgrade... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    Manually updating the linux image to the version of linux headers that was available in the repo was what finally fixed the issue for me.

    What version of linux headers is in the repo?
    Code:
    root@burtreynolds:~# apt-cache search linux-headers | grep kali
    linux-headers-4.15.0-kali2-all - All header files for Linux 4.15 (meta-package)
    linux-headers-4.15.0-kali2-all-amd64 - All header files for Linux 4.15 (meta-package)
    linux-headers-4.15.0-kali2-amd64 - Header files for Linux 4.15.0-kali2-amd64
    linux-headers-4.15.0-kali2-cloud-amd64 - Header files for Linux 4.15.0-kali2-cloud-amd64
    linux-headers-4.15.0-kali2-common - Common header files for Linux 4.15.0-kali2
    linux-headers-4.15.0-kali2-amd64 is the guy I want, so I installed installed the linux image for that version of linux-headers:

    Code:
    apt install linux-image-4.15.0-kali2-amd64
    Rebooted, then I could install the linux headers with the classic:
    Code:
    apt install linux-headers-$(uname -r)
    Voila, I could run VBoxLinuxAdditions.run and now I've got everything working. The part that was super annoying was that I actually had virtualbox-guest-x11 installed via apt the whole time, it just wasn't working. Had to do it the hard way.

Similar Threads

  1. Kali 2018.1 VM through Whonix routing issue - Nameserver
    By tempname in forum Kali Linux TroubleShooting
    Replies: 1
    Last Post: 2018-06-06, 11:48
  2. Error importing Kali 2018.1 VirtualBox OVA
    By statuc in forum Installing Kali Linux
    Replies: 6
    Last Post: 2018-05-18, 20:57
  3. Kali VirtualBox Issue
    By Harshh in forum General Archive
    Replies: 1
    Last Post: 2016-05-21, 09:28
  4. Kali Realtek 802.11n VirtualBox issue
    By scotsman in forum TroubleShooting Archive
    Replies: 0
    Last Post: 2016-03-20, 11:21

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
  •