Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I installed my Ubuntu in vmware, no I need install vmware tools, I got error:

Searching for a valid kernel header path... The path "" is not valid. Would you like to change it?[yes]

In CentOS, I run the following command to resolve this issue:

yum install gcc-c++
yum install kernel-devel
yum install kernel-headers
yum -y update kernel

But I don't know how to do in Ubuntu. Please help.

Update I have tried the following command but nothing changed,still got error:

Searching for a valid kernel header path... The path "" is not valid. Would you like to change it?[yes]

  • sudo apt-get update
  • sudo-get install build-essential linux-header-$(uname -r)
  • sudo ./vmware-uninstall-tools.pl
  • sudo ./vmware-config-tools.pl
  • sudo ./vmware-install.pl

Issue Changed:

Run sudo ./vmware-uninstall-tools.pl, and delete the folder of /etc/vmware-tools then, run sudo ./vmware-install.pl Now I can successfully install vmware-tool.After restart, I can see folder of /mnt/hgfs, but can't see my shared folder.

share|improve this question
add comment

8 Answers 8

I encountered this problem when upgrading from 12.10 to 13.04. No matter what I did, the VMware Tools installer couldn't seem to find the headers. For the record, here's how I installed the headers:

sudo apt-get update && sudo apt-get install build-essential linux-headers-$(uname -r)

Turns out, the installer is looking for the version.h file in under [kernelsource path]/include/linux/version.h, it's not there. The location of version.h is [kernelsource path]include/generated/uapi/linux/version.h

The solution is a symlink:

sudo ln -s /usr/src/linux-headers-$(uname -r)/include/generated/uapi/linux/version.h /usr/src/linux-headers-$(uname -r)/include/linux/version.h

After creating this symlink, I was able to run the VMware Tools installer without a problem.

share|improve this answer
2  
the symlink fixed my issue as well –  marc-andre benoit Apr 28 '13 at 9:25
    
symlink also did fix the issue on ubuntu 13.04 for me –  cobie Aug 4 '13 at 21:56
    
+1 for the symlink work around, this also solved it for me. –  Mahn Sep 9 '13 at 14:34
add comment
sudo apt-get install build-essential linux-headers-$(uname -r)

& then install VM-WARE-TOOLS

Go to vmware "VM" tab to install vmware tools

Plz Keep it in mind when you update Ubuntu ( & the kernel version is changed ) u need to run

vmware-config-tools.pl

every time only when kernel is changed

share|improve this answer
    
run vmware-config-tools.pl, got same error message:**Searching for a valid kernel header path... The path "" is not valid. Would you like to change it?** –  Tom May 7 '12 at 1:05
    
are you running it with sudo vmware-config-tools.pl ? , i have check its working properly –  One Zero May 7 '12 at 1:57
    
I have run vmware-config-tools.pl,nothing changed. –  Tom May 7 '12 at 4:08
4  
+1 for a generic approach (uname -r) –  Garrett Bluma Jul 31 '12 at 15:24
    
+1 This worked with VMWare Player v5.0.1 on Quantal as well. –  IsaacS Jan 21 '13 at 0:49
add comment

Specify /lib/modules/3.2.0-24-virtual/build/include as the path after you installed kernel headers via One Zero's answer.

share|improve this answer
add comment

I've just done this on a VMware hosted Ubuntu Linux 12.04 (32-bit) machine and found I needed to do

sudo apt-get install linux-headers-3.2.0-24-generic-pae

As well as having the normal build-essential package installed.

Your mileage will vary in terms of the exact linux-headers package to install I guess. But that worked fine for me.

share|improve this answer
    
Not working.'tom@ubuntu:~/vmware-tools-distrib$ sudo apt-get install linux-headers-3.2.0-24-generic-pae Reading package lists... Done Building dependency tree Reading state information... Done linux-headers-3.2.0-24-generic-pae is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 31 not upgraded. ' –  Tom May 7 '12 at 1:16
add comment

1) Use Install VMWare Tools option in VMWare Client to attach media

2) Update the server

sudo apt-get update
sudo apt-get upgrade

3) Create the mount point

sudo mkdir -p /media/cdrom

4) Mount the ISO

sudo mount /dev/cdrom /media/cdrom

5) Change Directory

cd /media/cdrom

6) Copy the tar file to your /tmp directory

sudo cp VM*.tar.gz /tmp

7) Install Build tools if necessary

sudo apt-get install linux-headers-server build-essential
(for desktop is "sudo apt-get install linux-headers-$(uname -r) build-essential")

8) Change Directory

cd /tmp

9) Unmount the ISO

sudo umount /media/cdrom

10) Expand the tar

sudo tar xzvf VM*.tar.gz

11) Change Directory

cd vmware-tools-distrib

12) Create a special directory

sudo mkdir /usr/lib64

13) Run the Install Script

sudo ./vmware-install.pl -d

14) Reboot

sudo reboot

source

share|improve this answer
    
That helped, first one statement didn't worked. –  Johnny_D May 12 '13 at 21:21
add comment

Try

sudo apt-cache search *package-name*

and your package name Ex:

sudo apt-cache search kernel

and you will be produced with all the available packages in the repository , find out the one you want and

sudo apt-get install *package-name*

it . Before doing it update your repository with

sudo apt-get update
share|improve this answer
    
Hi, It's not working.tom@ubuntu:~/vmware-tools-distrib$ sudo apt-get install kernel-devel Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package kernel-devel –  Tom May 4 '12 at 10:12
    
Have you tried with the sudo apt-cache search kernel ? You will be definitely shown up with some search results . My laptop is not available at this moment otherwise i would have posted you with screenshots ..... –  mViswa May 4 '12 at 11:10
    
What's the meaning of searching? I got lots of results. –  Tom May 7 '12 at 1:36
add comment

install the .bundle as usual

download this file PATCH

Extract it in the home directory and delete the old patch flag:

sudo rm /usr/lib/vmware/modules/source/.patched

Then run the patch as usual:

sudo ./patch-modules_3.2.0.sh vmware3.2.0.patch

Hope that helps. If it doesnt work try keepin the two patch files and the .bundle setup in home directory.

PS: I found this on the forums of VMWare and it fixed the installation issue for me.

share|improve this answer
add comment

The open source tools for VMWare should work just as well, if you want to try going down that route.

For Ubuntu 12.04+

sudo apt-get install open-vm-tools

I believe it handles everything else for you. Just restart the virtual machine and VMWare Player should work without a hitch.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.