2
votes

Using Ubuntu 16.04, Android Studio and Genymotion (latest versions).

Genymotion works perfectly when run directly, but does not work from Android Studio with the Genymotion plug-in installed. The error I get from Genymotion is "In order to work, Genymotion requires VirtualBox to be installed on your computer. You can download the latest version of VirtualBox from www.virtualbox.org/wiki/Downloads.".

Of course VirtualBox is installed. Even tried removing it and installing again (v. 5.1).

3

3 Answers

3
votes

There is an odd issue with the Genymotion Android Studio plugin, which makes it impossible to start a device. This often manifests with genymotion.log containing error messages such as:

Output command: "/usr/lib/virtualbox/VBoxManage: ./libssl.so.1.0.0: version 'OPENSSL_1.0.2' not found (required by /usr/lib/x86_64-linux-gnu/libcurl.so.4)"

It comes from the fact that Android Studio defines LD_LIBRARY_PATH to be /android/studio/install/dir/bin:$LD_LIBRARY_PATH which becomes /android/studio/install/dir/bin: if LD_LIBRARY_PATH is not set. This causes VBoxManage to try to load the libssl.so shipped by Genymotion, which is too old for Ubuntu 16.04 (because when LD_LIBRARY_PATH ends with ":", the linker looks for libraries in the current directory)

You can do one of the following:

  • Edit studio.sh to stop adding a trailing ":" at the end of LD_LIBRARY_PATH (I can provide more details if needed)
  • Remove libssl.so and libcrypto.so from Genymotion install directory
  • Define LD_LIBRARY_PATH to some random value before starting Android Studio so that the LD_LIBRARY_PATH defined by studio.sh does end with ":"

Note that this has been fixed in Android Studio 3.1.

0
votes

After visiting the Genymotion site, it might have something to do with the dkms package:

Make sure that the dkms package is installed and that it compiles VirtualBox kernel modules each time a new kernel update is available.
To do so, run sudo /etc/init.d/vboxdrv status.
You should get the message "VirtualBox kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) are loaded".
If not, force VirtualBox kernel modules compilation by running sudo /etc/init.d/vboxdrv setup.
Make also sure that you are part of the vboxusers group.
If not, run sudo usermod -a -G vboxusers <login>.

Maybe it is caused because of the dkms package is not updated, so you are not able to use Genymotion from Android Studio but only running it directly.

0
votes

ok this took me some quality time to figure out take this step

  1. locate your etc folder
  2. cd into init.d
  3. run virtualbox status: if it tells you that you need to install dkms package. then on a new terminal
  4. sudo apt-get install linux-headers-uname -r
  5. sudo dpkg-reconfigure virtualbox-dkms 6.enter a password and renenter
  6. then reboot and load to MOK(Your will get a blue screen that will ask to reload to MOK before rebooting)
  7. Ok your machine by now is rebooted
  8. start your terminal go to etc/init.d
  9. run virtualbox staus
  10. I believe no errors
  11. on a new terminal cd to your directory with genymotion 13.cd into genymotion
  12. run ./genymotion
  13. congrats