VMware Communities
fkereki229
Contributor
Contributor
Jump to solution

Problem with installation -- gcc not found

I'm trying to install VMware Player in OpenSUSE Tumbleweed, updated to the latest version, which provides kernel 4.6.

After running vmplayer, I get a window showing an error: "A compatible version of gcc was not found."

After clicking OK in that window, I get a new window with another warning: "GNU C Compiler (gcc) version 6.1.1 was not found.".

However, if I do gcc --version, I get the following, that shows I've got the latest gcc.

gcc (SUSE Linux) 6.1.1 20160615 [gcc-6-branch revision 237474]

Copyright (C) 2016 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Even if I search for the gcc directory (given by whereis gcc) the problem doesn't go away.

How can I install VMware Player, then?

1 Solution

Accepted Solutions
fkereki229
Contributor
Contributor
Jump to solution

Hi!

I solved the installation problem, by googling around, and joining several answers together.

The full instructions are as follows:

  • cd to that directory, and extract everything

chmod +x VMware-Player-12.1.1-3770994.x86_64.bin

./VMware-Player-12.1.1-3770994.x86_64.bin -x temp

tar xf ./temp/vmware-vmx/lib/modules/source/vmmon.tar

tar xf ./temp/vmware-vmx/lib/modules/source/vmmon.tar

  • patch files, and build

cd vmmon-only

nano linux/hostif.c

# search for get_user_pages and change it to get_user_pages_remote

make

cd ../vmnet-only

nano userif.c

# search for get_user_pages and change it to get_user_pages_remote

make

cd ..

  • put the modules in place, and done!

cp vmmon.o /lib/modules/`uname -r`/misc/vmmon.ko

cp vmnet.o /lib/modules/`uname -r`/misc/vmnet.ko

depmod -a

/etc/init.d/vmware restart


I found several places where the gcc version was used, but I didn't have to do anything.


Thanks for the help, wila !


View solution in original post

0 Kudos
13 Replies
wila
Immortal
Immortal
Jump to solution

Hello,

Interesting question...

I had a look at an installed version of VMware Player down here and it seems that the installer script uses gcc -dumpversion to determine the actual version.

eg.

/usr/lib/vmware-installer/2.1.0/python/pygtk# grep -n -r -C 8 "gcc" *

dsextras.py-96-    return 0

dsextras.py-97-

dsextras.py-98-class BuildExt(build_ext):

dsextras.py-99-    def init_extra_compile_args(self):

dsextras.py-100-        self.extra_compile_args = []

dsextras.py-101-        if sys.platform == 'win32' and \

dsextras.py-102-           self.compiler.compiler_type == 'mingw32':

dsextras.py-103-            # MSVC compatible struct packing is required.

dsextras.py:104:            # Note gcc2 uses -fnative-struct while gcc3

dsextras.py-105-            # uses -mms-bitfields. Based on the version

dsextras.py-106-            # the proper flag is used below.

dsextras.py-107-            msnative_struct = { '2' : '-fnative-struct',

dsextras.py-108-                                '3' : '-mms-bitfields' }

dsextras.py:109:           gcc_version = getoutput('gcc -dumpversion')

dsextras.py-110-            print 'using MinGW GCC version %s with %s option' % \

dsextras.py:111:                  (gcc_version, msnative_struct[gcc_version[0]])

dsextras.py:112:            self.extra_compile_args.append(msnative_struct[gcc_version[0]])

dsextras.py-113-

dsextras.py-114-    def modify_compiler(self):

dsextras.py-115-        if sys.platform == 'win32' and \

dsextras.py-116-           self.compiler.compiler_type == 'mingw32':

dsextras.py-117-            # Remove '-static' linker option to prevent MinGW ld

dsextras.py-118-            # from trying to link with MSVC import libraries.

dsextras.py-119-            if self.compiler.linker_so.count('-static'):

dsextras.py-120-                self.compiler.linker_so.remove('-static')

On that machine it returns:

$ gcc -dumpversion

5.4.0

So see what happens if you try gcc with the -dumpversion parameter and if that doesn't work..

Easiest is probably to adjust that script.

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
fkereki229
Contributor
Contributor
Jump to solution

This looks interesting, and can explain the observed behavior: -dumpversion produces just "6" while --version gets "6.1.1".

> gcc -dumpversion

6

> gcc --version

gcc (SUSE Linux) 6.1.1 20160615 [gcc-6-branch revision 237474]

Copyright (C) 2016 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE

The shown code seems to be for Windows, but I'll look for some Linux part... or I'll go one better, and just change the line, not call "gcc" at all, and just plug in a "6.1" value to see what happens!

Thanks for the idea!

0 Kudos
wila
Immortal
Immortal
Jump to solution

heh, yeah I'm not even sure if this is the part of code that causes your error, just did a recursive grep search for gcc on some vmware directories.

As this was an installer folder it seems like it might come from there.

Also noticed the if statement and windows part, but the dumpversion parameter at least appears to explain why you are seeing what you are bumping into.

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
fkereki229
Contributor
Contributor
Jump to solution

Hi!

I solved the installation problem, by googling around, and joining several answers together.

The full instructions are as follows:

  • cd to that directory, and extract everything

chmod +x VMware-Player-12.1.1-3770994.x86_64.bin

./VMware-Player-12.1.1-3770994.x86_64.bin -x temp

tar xf ./temp/vmware-vmx/lib/modules/source/vmmon.tar

tar xf ./temp/vmware-vmx/lib/modules/source/vmmon.tar

  • patch files, and build

cd vmmon-only

nano linux/hostif.c

# search for get_user_pages and change it to get_user_pages_remote

make

cd ../vmnet-only

nano userif.c

# search for get_user_pages and change it to get_user_pages_remote

make

cd ..

  • put the modules in place, and done!

cp vmmon.o /lib/modules/`uname -r`/misc/vmmon.ko

cp vmnet.o /lib/modules/`uname -r`/misc/vmnet.ko

depmod -a

/etc/init.d/vmware restart


I found several places where the gcc version was used, but I didn't have to do anything.


Thanks for the help, wila !


0 Kudos
grantronyx
Contributor
Contributor
Jump to solution

I felt the need to post this is for fixing VMware Workstation 12.5.0 build-4352439 in 4.6.0-kali1-amd64 aka Kali GNU/Linux Rolling 2016.2, but may also apply to other distros...

1. Download VMware-Workstation-Full-12.5.0-4352439.x86_64.bundle from here: http://www.vmware.com/products/workstation/workstation-evaluation.html

2. Run this in a terminal (note Kali users typically run as root so use a "sudo su" beforehand if not in Kali... also be sure you actually have a Downloads directory in your home directory (~/) or correct the script to point to the right place, i.e. where you downloaded the VMware-Workstation-Full-12.5.0-4352439.x86_64.bundle)

touch ~/Downloads/vmwarepatch.sh;

echo '#!/bin/bash

chmod 755 ~./Downloads/VMware-Workstation-Full-12.5.0-4352439.x86_64.bundle

~/Downloads/VMware-Workstation-Full-12.5.0-4352439.x86_64.bundle -x ~/Downloads/temp

tar xf ~/Downloads/temp/vmware-vmx/lib/modules/source/vmmon.tar

tar xf ~/Downloads/temp/vmware-vmx/lib/modules/source/vmnet.tar

sed "s/get_user_pages/get_user_pages_remote/g" ~/Downloads/temp/vmmon-only/linux/hostif.c

make -C ~/Downloads/temp/vmmon-only/

sed "s/get_user_pages/get_user_pages_remote/g" ~/Downloads/temp/vmnet-only/userif.c

make -C ~/Downloads/temp/vmnet-only/

mkdir /lib/modules/`uname -r`/misc/

cp ~/Downloads/temp/vmmon.o /lib/modules/`uname -r`/misc/vmmon.ko

cp ~/Downloads/temp/vmnet.o /lib/modules/`uname -r`/misc/vmnet.ko

depmod -a

/etc/init.d/vmware restart'

rm -rf ~/Downloads/temp > ~/Downloads/vmwarepatch.sh;

chmod 755 ~/Downloads/vmwarepatch.sh;

~/Downloads/vmwarepatch.sh

3. Start VMware Workstation and if it asks where your gcc 5.4.0 is... point it to /usr/bin/gcc-5 and hit okay. It should run through everything correctly and start up FTW. Cheers!

vmpluser
Contributor
Contributor
Jump to solution

See my simple solution for Kali Linux newest (Rolling) distribution:

It seems that you need to point to the gcc-5 binary executable.

When the vmware installation prompts that a compatible version of gcc was not found supply it with the path /usr/bin/gcc-5

First be sure to check that you actually have the gcc-5 compiler installed:

gcc-5 --version

gcc-5 (Debian 5.4.1-1) 5.4.1 20160803

Copyright (C) 2015 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If not install it using apt-get:

# apt-get install gcc-5

And you should now be able to install vmware.

0 Kudos
skiddle1966
Contributor
Contributor
Jump to solution

Hello Is it a possibility that you could get a hold of me on Facebook? I am having a problem with the commands. I installed Parrot Security and its a Debian 9 base. Should be the same as Kali.. Any help would be great !! Thanks in Advance!!

0 Kudos
yoosamui
Contributor
Contributor
Jump to solution

I'm trying to install VMware Player in Debian :

Kernel : 4.7.0-1-amd64

installed gcc versions:

gcc --version

gcc (Debian 6.2.0-10) 6.2.0 20161027

gcc-5 --version

gcc-5 (Debian 5.4.1-3) 5.4.1 20161019

vmware to install is:

VMware-Workstation-Full-12.5.1-4542065.x86_64.bundle

After running vmplayer, I get a window ( Vmware Kernel Module Updater) showing GNU C Complier (gcc) version 5.4.1 was not found...

and asking for Location. I enter the /usr/bin/gcc-5 and click on install.

After this , I get a window showing an error: "A compatible version of gcc was not found."

i also trying the suggestion patch from

unfortunately don't work because make fails on  hostif.c and userif.c

get_user_pages_remote hast to few parameters!


very frustrated. I don't know what to do more...


Any Ideas?

Thanks in Advance!!!

0 Kudos
skiddle1966
Contributor
Contributor
Jump to solution

I have a fix...  you can contact me  at:     jeff@parrotsec.org

0 Kudos
yoosamui
Contributor
Contributor
Jump to solution

I solved the installation problem on Debian , by compiling the module vmnet-only and vmmon-only.

May also apply to other distros.

This solution is only valid for VMware-Workstation-Full-12.5.1-4542065.x86_64.bundle version.

instructions:

1.

Download VMware-Workstation-Full-12.5.1-4542065.x86_64.bundle and VMware-Player-12.1.1-3770994.x86_64.bundle from here:

https://my.vmware.com/en/web/vmware/free#desktop_end_user_computing/vmware_workstation_player/12_0

2.

open a terminal where the Downloaded files ate located e.g ~/Downloads

3.

install VMware-Workstation-Full-12.5.1-4542065.x86_64.bundle

sudo sh ./VMware-Workstation-Full-12.5.1-4542065.x86_64.bundle

4.

chmod +x VMware-Player-12.1.1-3770994.x86_64.bundle

./VMware-Player-12.1.1-3770994.x86_64.bundle -x temp

5.

tar xf ./temp/vmware-vmx/lib/modules/source/vmmon.tar

tar xf ./temp/vmware-vmx/lib/modules/source/vmnet.tar

6.

cd vmmon-only

nano linux/hostif.c

search for get_user_pages and change it to get_user_pages_remote

make

cd ../vmnet-only

7.

nano userif.c

search for get_user_pages and change it to get_user_pages_remote

nano netif.c

search for line 468 and uncomment it : // dev->trans_start = jiffies;

make

cd ..

8.

sudo cp vmmon.o /lib/modules/`uname -r`/misc/vmmon.ko

sudo cp vmnet.o /lib/modules/`uname -r`/misc/vmnet.ko

sudo depmod -a

sudo /etc/init.d/vmware restart

-Finish-

Start vmware. it should work!

Thanks!

0 Kudos
GraisonVogsOnVm
Contributor
Contributor
Jump to solution

i tried doing your method for deb, but it said access dined...

0 Kudos
bbarr7
Contributor
Contributor
Jump to solution

try sudo first then command will fix the access denied issue. 

0 Kudos