[Switch] Ubuntu12.04 compilation exception and solution

Ubuntu12.04 compilation exception and solution
 
one,
二、build/core/config.mk:268: *** Error: could not find jdk tools.jar, please in.......
I reinstalled java6
Note that modifications must be made, all four must be present, otherwise the problem of jar:command not found will occur
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/java/jdk1.6.0/bin/java 300  
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java/jdk1.6.0/bin/javac 300  
sudo update-alternatives --install /usr/bin/javah javah /usr/lib/jvm/java/jdk1.6.0/bin/javah 300
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/java/jdk1.6.0/bin/jar 300
sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/java/jdk1.6.0/bin/javadoc 300
sudo update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/java/jdk1.6.0/bin/javap 300
三、/bin/bash: jar: command not found
Solution:
 
cd /usr/bin
 
You must first enter /usr/bin, the same below
 
sudo ln -s -f /usr/lib/jvm/jdk1.6.0_30/bin/jar
 
My jdk is installed in the /usr/lib/jvm/jdk1.6.0_30/ directory
 
If it prompts javah: commond not found, then draw the scoop according to the gourd and enter the command
 
cd /usr/bin
ln -s -f /usr/lib/jvm/jdk1.6.0_30/bin/javah
 
四、g++: g++: selected multilib '32' not installed 
sudo apt-get install g++-multilib
sudo apt-get install libc6-dev ia32-libs lib32ncurses5-dev x11proto-core-dev libx11-dev lib32readline-gplv2-dev lib32z-dev libgl1-mesa-dev mingw32 tofro dos python-markdown libxml2-utils
sudo apt-get install g++-4.4-multilib
 
五、make: *** [out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/noproguard.classes-with-local.dex] Killed
Reason: enough memory, OOM generated by linux. 
Solution: The memory is required to be about 1.5G, and the hard disk is more than 25G. In the past, 1G and 10G were enough. Official description "Note: The source download is approximately 6GB in size. You will need 25GB free to complete a single build, and up to 80GB (or more) for a full set of builds."
 
六、make: *** [out/host/linux-x86/obj/lib/libGLES_CM_translator.so] Error 1
 
Workaround: sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1.2 /usr/lib/libGL.so
 
Reprinted from: http://www.2cto.com/os/201305/213776.html
七、如果提示  /work/android/Android4.1.2/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6/bin/../lib/gcc/i686-linux/4.6.x-google/http://www.cnblogs.com/http://www.cnblogs.com/i686-linux/bin/as: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory.

command: sudo apt-get install apt-file

command: sudo apt-file update

If you still encounter errors at this time

When executing the program, I get errors like the following:
./tests: error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or directory ./tests: error while loading shared libraries: xxx.so.0: cannot open shared object file: No such file or directory

That means the system does not know which directory xxx.so is placed in. That means the system does not know which directory xxx.so is placed in.
ghostli123@ghostli123-HP-Pro-3380-MT:~/WORKING_DIRECTORY$ apt-file search libz.so
lib32z1: /usr/lib32/libz.so.1
lib32z1: /usr/lib32/libz.so.1.2.3.4
lib32z1 : /usr/lib32/libz.so.1.2.7
lib32z1-dev: /usr/lib32/libz.so
lsb-build-base3: /usr/lib/lsb3/libz.so
zlib1g: /lib/x86_64-linux- gnu/libz.so.1
zlib1g: /lib/x86_64-linux-gnu/libz.so.1.2.3.4
zlib1g: /lib/x86_64-linux-gnu/libz.so.1.2.7
zlib1g-dbg: /usr/ lib/debug/lib/libz.so.1.2.3.4
zlib1g-dbg: /usr/lib/debug/lib/x86_64-linux-gnu/libz.so.1.2.3.4
zlib1g-dbg: /usr/lib/debug/ lib/x86_64-linux-gnu/libz.so.1.2.7
zlib1g-dbg: /usr/lib/debug/usr/lib/libz.so.1.2.7
zlib1g-dbg: /usr/lib/debug/usr/lib32/libz.so.1.2.3.4
zlib1g-dbg: /usr/lib/debug/usr/lib32/libz.so.1.2.7
zlib1g-dev: /usr /lib/x86_64-linux-gnu/libz.so At
this time, the directory where xxx.so is located should be added to /etc/ld.so.conf. Generally speaking, there are many so files in the /usr/lib directory, so adding the /usr/local/lib line to /etc/ld.so.conf can solve this problem. After the /etc/ld.so.conf is archived, execute "/sbin/ldconfig -v" to update it to take effect. After the /etc/ld.so.conf is archived, execute "/sbin/ldconfig -v" to update it to take effect.

8. Required software during installation     $sudo apt-get install build-essential
    $sudo apt-get install zlib1g-dev
    $sudo apt-get install flex
    $sudo apt-get install libncurses-dev
    $sudo apt-get install libx11-dev
    $ sudo apt-get install gperf

   $sudo apt-get install bison

Nine, can not find libz.so or libz.a file

The system does not have the libz library installed, use apt-get install lib32z1-dev to install it.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326546128&siteId=291194637