Ubuntu14.04 creates Genymotion virtual machine

Recently, the working development environment has been switched from Windows to Ubuntu. It was quite easy to use Genymotion for Android development in the Windows environment. Then create a Genymotion virtual machine on the desktop in the Ubuntu environment. Let’s try it out today~! ~!

Virtualbox

Install the virtual machine software Virtualbox first. Genymotion software cannot be used without this software.

sudo apt-get install virtualbox

Genymotion

download#

First visit Genymotion official website, you must first register a Genymotion account if you want to download.

genymotion.png

Click the download button in the upper right corner to enter the download page. There are many versions of Genymotion, some of which are charged sometimes. As a developer, we can use the most basic version (PS: free). Select Get Genymotion personal version, enter personal Edit and download genymotion-2.8.1_x64.bin.

Execute the following command to generate a folder named genymotion.

chmod +x [InstallerPath]/genymotion.bin  
[ InstallerPath]/genymotion.bin 

run#

After entering the genymotion folder, we can see the executable program named genymotion, double-click or run it in the command line.

im@58user:/usr/lib/x86_64-linux-gnu$ sudo /home/im/program/genymotion/./genymotion
Logging activities to file:/home/im/.Genymobile/genymotion.log
Logging activities to file:/home/im/.Genymobile/genymotion.log
Logging activities to file:/home/im/.Genymobile/Genymotion/deployed/Google Nexus 5X -6.0.0- API 23- 1080x1920/genymotion-player.log
OpenGL connected to 192.168.56.101:25000
Port 22468 will be used for OpenGL data connections

If there is no problem, it will start as in the Windows environment.

problem##

Good things have been tedious

Question 1:

im@58user:/usr/lib/x86_64-linux-gnu$ sudo /home/im/program/genymotion/./genymotion
/home/im/program/genymotion/./genymotion:/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/im/program/genymotion/libQt5Core.so.5)
/home/im/program/genymotion/./genymotion: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found(required by /home/im/program/genymotion/libQt5WebKit.so.5)/home/im/program/genymotion/./genymotion:/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/im/program/genymotion/libicui18n.so.52)
/home/im/program/genymotion/./genymotion: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.8' not found(required by /home/im/program/genymotion/libicuuc.so.52)/home/im/program/genymotion/./genymotion:/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found(required by /home/im/program/genymotion/libQt5Qml.so.5)

When the genymotion program is executed, the corresponding file is missing, and the answer is found on the Internet, prompting to update gcc to 4.9

Below is the solution on the Internet

sudo add-apt-repository ppa:ubuntu-toolchain-r/test  
sudo apt-get update  
sudo apt-get install gcc-4.9 g++-4.9

However, there is no way to update gcc when executed in my computer environment.

Log information:

im@58user:/usr/lib/x86_64-linux-gnu$ sudo apt-get install gcc-4.9 g++-4.9[sudo] password for im: 
Reading package list...carry out
Analyzing the dependency tree of the package
Reading status information...carry out
Some packages cannot be installed. If you are using an unstable distribution, this may be
Because the system cannot reach the state you requested. There may be some software you need in this version
The packages have not been created yet or they have been newly arrived(Incoming)The directory is moved out.
The following information may be helpful in solving the problem:

The following packages have unmet dependencies:
 g++-4.9:i386 :rely: gcc-4.9-base:i386(=4.9.4-2ubuntu1~14.04.1)But 4.9.3-0ubuntu4 is about to be installed
    rely: libstdc++-4.9-dev:i386(=4.9.4-2ubuntu1~14.04.1)But it will not be installed
    rely: libcloog-isl4:i386(>=0.17)But it will not be installed
    rely: libmpc3:i386 but it will not be installed
    rely: libmpfr4:i386(>=3.1.3)But it will not be installed
 gcc-4.9:i386 :rely: cpp-4.9:i386(=4.9.4-2ubuntu1~14.04.1)But it will not be installed
    rely: gcc-4.9-base:i386(=4.9.4-2ubuntu1~14.04.1)But 4.9.3-0ubuntu4 is about to be installed
    rely: binutils:i386(>=2.24)But it will not be installed
    rely: libgcc-4.9-dev:i386(=4.9.4-2ubuntu1~14.04.1)But it will not be installed
    rely: libcloog-isl4:i386(>=0.17)But it will not be installed
    rely: libmpc3:i386 but it will not be installed
    rely: libmpfr4:i386(>=3.1.3)But it will not be installed
E:Errors cannot be corrected because you require certain packages to remain as they are, but they break the dependencies between packages.

So helpless, there is no way to solve this problem.

Then execute the command to run genymotion

im@58user:/usr/lib/x86_64-linux-gnu$ sudo /home/im/program/genymotion/./genymotion

Check the output log, there is such a key message /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version xxx not found, check the files in this path:

im@58user:/usr/lib/x86_64-linux-gnu$ ls | grep "libstdc"
libstdc++.so.6
libstdc++.so.6.0.19
im@58user:/usr/lib/x86_64-linux-gnu$ pwd
/usr/lib/x86_64-linux-gnu

There is the file libstdc++.so.6! ! !

Question two:
To upgrade gcc (PS: upgrade failed), will gcc4.9 have a higher version of libstdc++.so.6 than gcc4.8. First download libstdc++ to see.
[ http://ftp.debian.org/debian/pool/main/g/gcc-4.9/libstdc++6-4.9-dbg_4.9.2-10_amd64.deb](https://link.jianshu.com/?t =http://ftp.debian.org/debian/pool/main/g/gcc-4.9/libstdc++6-4.9-dbg_4.9.2-10_amd64.deb) I am very excited about .deb, is it possible to install it directly? That's it. The result still prompts "dependency: gcc-4.9-base:i386".

Think about it, first unzip it and see what is in the libstdc++6-4.9-dbg_4.9.2-10_amd64.deb file:

libstdc++6-4.9-dbg_4.9.2-10_amd64.deb.png

Find libstdc++.so.6.0.20, extract it and modify it to libstdc++.so.6, and replace it with libstdc++.so.6 in the /usr/lib/x86_64-linux-gnu directory. Run genymotion again and start successfully~! ~!

Recommended Posts

Ubuntu14.04 creates Genymotion virtual machine
Install ubuntu on virtual machine
Virtual machine VirtualBox-5.1 install ubuntu16.0.1
Virtual machine Linux Ubuntu installation tutorial
Install Ubuntu 18.04 in the virtual machine VMware
Vagrant quickly builds Ubuntu virtual machine environment
Install R package on UBUNTU virtual machine
Putty remote login VMware virtual machine Linux (Ubuntu12.04)
Virtual machine installation and configuration ubuntu shared folder_
Use Ubuntu and windows system in virtual machine
003.KVM virtual machine deployment-CentOS6.8
Python virtual environment: Ubuntu16.04
Solution to the virtual machine ubuntu16.04 cannot connect to the Internet
Install OS X 10.15 virtual machine based on Ubuntu platform
The same solution for cloning ubuntu18 virtual machine ip
Install Ubuntu on VMware virtual machine and install using UltraISO
Xshell and Xftp fail to connect to the virtual machine Ubuntu
Linux CentOS 7 virtual machine clone
Install VM virtual machine on Mac, equipped with Ubuntu system
VMwareWorkstation10.0 install CentOS7.0 virtual machine
CentOS 6.8 virtual machine installation details
Build an Ubuntu Linux development environment on a Vmware virtual machine
Ubuntu creates users adduser and useradd
Install Python virtual environment on Ubuntu 18.04
How to expand the ubuntu LVM partition of a VirtualBox virtual machine
Solution to the problem that ubuntu cannot connect to the Internet in the virtual machine
How to make the ubuntu virtual machine in vmware display in full screen