How to fix “The path “” is not a valid path to the 3.x-kali-amd64 kernel headers”

Problem:

If you encountered the following error when trying to install VMware tools on Kali operating system, you may be facing a corruption in your kernel headers.

Kali kernel header path Error

Solution of “The path “” is not a valid path to the …”:

1.If you are at the following prompt, continue to step 2

The path “” is not a valid path to the 3.7-trunk-amd64 kernel headers.
 Would you like to change it? [yes]

Otherwise do not enter any path followed by the enter or return key on the following prompt

Enter the path to the kernel header files for the 3.7-trunk-amd64 kernel?

2. Enter “no” without the quotations and press enter

This will result in the following output

WARNING: This program cannot compile any modules for the following reason(s)...

- This program could not find a valid path to the kernel headers of the running kernel. Please ensure that the header files for the running kernel are installed on this system. 
[ Press Enter key to continue ]

Press enter anyways and continue the installation. Once you are back at the prompt, continue to step 3

3. Enable cups and vmware-tools followed by installing the linux header by running the following commands

echo cups enabled >> /usr/sbin/update-rc.d
echo vmware-tools enabled >> /usr/sbin/update-rc.d
apt-get install gcc make linux-headers-$(uname -r)
ln -s /usr/src/linux-headers-$(uname -r)/include/generated/uapi/linux/version.h /usr/src/linux-headers-$(uname -r)/include/linux/version.h

Note: If after running the apt-get install gcc make linux-headers-$(uname -r) command, you see the following error

linux headers install error not a valid path to theThen follow the instructions below depending on your version of Kali:

3.a. Find Kali Version

cat /etc/issue

You should see an output like “Kali GNU/Linux X.n \n \l” where X represents your Kali version.

3.b. Add source

For Kali 1.X

Add “deb http://http.kali.org/kali kali main contrib non-free” at the end of the /etc/apt/sources.list file

You can also run:

# echo "deb http://http.kali.org/kali kali main contrib non-free" >> /etc/apt/sources.list

For Kali 2.X

Add “deb http://http.kali.org/kali sana main non-free contrib” at the end of the /etc/apt/sources.list file

You can also run:

# echo "deb http://http.kali.org/kali sana main contrib non-free" >> /etc/apt/sources.list

3.c. Update lists of packages

# apt-get update

And finally rerun the apt-get install gcc make linux-headers-$(uname -r) command.

4. Finally rerun the VMware installer command (./vmware-install.pl)

————————-

If you found this article useful, don’t forget to share it by clicking one of the buttons below. You can also share your thoughts in the comments section below.

That should fix the error message “The path “” is not a valid path to the 3.x-kali-amd64 kernel headers”, if you have any questions or concerns please leave a comment below. You can also follow me on Twitter, add me to your circle on Google+, or like my Facebook page to keep yourself updated on all the latest of Hardware and Software reviews.

Found this post useful?

Subscribe to our RSS feed, follow us on Twitter or help us grow by sharing our content using the buttons below

This entry was posted in Linux, Software and tagged , , . Bookmark the permalink.

5 Responses to How to fix “The path “” is not a valid path to the 3.x-kali-amd64 kernel headers”

  1. Star says:

    Thank you very much this post is really useful.
    but firstly you should explain how to append (leafpad /etc/apt/sources.list).
    Secondly the “”deb http://http.kali.org/kali kali main contrib non-free”” is used for Kali Linux 1.x.
    for Kali Linux 2.0 – Kali Sana users you should use :

    # Regular repositories
    deb http://http.kali.org/kali sana main non-free contrib
    deb http://security.kali.org/kali-security sana/updates main contrib non-free
    # Source repositories
    deb-src http://http.kali.org/kali sana main non-free contrib
    deb-src http://security.kali.org/kali-security sana/updates main contrib non-free

  2. ARITRA BASU says:

    THIS SOLUTION IS NOT WORKING FOR KALI ROLLING, AND BIT OF MORE EXPLANATION WOULD HELP ONLY!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.