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~! ~!
Install the virtual machine software Virtualbox first. Genymotion software cannot be used without this software.
sudo apt-get install virtualbox
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
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.
Good things have been tedious
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