vboxdrv: Unknown symbol mcount (err 0)

if you come across this error here is what you have to do

me@me-desktop:~$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.7-1ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.4.7 (Ubuntu/Linaro 4.4.7-1ubuntu2) 
me@me-desktop:~$ dmesg | grep gcc
[ 0.000000] Linux version 3.13.0-62-generic (buildd@lgw01-26) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #102~precise1-Ubuntu SMP Wed Aug 12 14:09:54 UTC 2015 (Ubuntu 3.13.0-62.102~precise1-generic 3.13.11-ckt24)

if  you find that gcc version is mismatched between kernel and what you have on the machine, like how I have “gcc version 4.4.7 (Ubuntu/Linaro 4.4.7-1ubuntu2)” and “(gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)”

then next would be to install gcc version same as kernel.

but if you already have this version installed and you find that it is not default like

me@me-desktop:/usr/bin$ ls /usr/bin/g++
g++      g++-4.4  g++-4.6  g++.bak  
me@me-desktop:/usr/bin$ ls /usr/bin/gcc
gcc      gcc-4.4  gcc-4.6  gcc.bak

then delete the old link and create new symbolic links

me@me-desktop:/usr/bin$ sudo rm -rf gcc
me@me-desktop:/usr/bin$ sudo ln -s gcc-4.6 gcc
me@me-desktop:/usr/bin$ ls -l gcc
lrwxrwxrwx 1 root root 7 Sep  4 00:11 gcc -> gcc-4.6

me@me-desktop:/usr/bin$ sudo rm -rf g++
me@me-desktop:/usr/bin$ sudo ln -s g++-4.6 g++
me@me-desktop:/usr/bin$ ls -l g++
lrwxrwxrwx 1 root root 7 Sep  4 00:12 g++ -> g++-4.6


after this run below command

me@me-desktop:/usr/bin$ sudo /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modules ...done.
Trying to register the VirtualBox kernel modules using DKMS ...done.
Starting VirtualBox kernel modules ...done.

Wolah you have solved this issue.





About preetammn

engineer trying to figure out the world, people and machines.
This entry was posted in Ubuntu. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s