先说下我的环境:Ubuntu 10.10 x64的版本第一步:安装Java SDK 1.6 后续的版本估计都是要用JDK 1.6了吧这里给个地址,大家自助下载:然后修改~/.profile 添加下边这两行:export PATH=$PATH:/opt/jdk1.6/bin/export JAVA_HOME=/opt/jdk1.6/其中上边的/opt/jdk1.6是我安装JDK的地方,大家想装那里就随意吧,也可以让1.6和1.5共存,就看大家愿意怎么弄了第二步:Ubuntu 10.10中缺少什么就装什么,这里主要总结一下出错的地方1、编译过程中出现com.sun.javadoc不存在的错误,如下方式解决:export ANDROID_JAVA_HOME=$JAVA_HOME2、usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory解决办法:sudo apt-get install libc6-dev-i3863、/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/libstdc++.so when searching for -lstdc++解决办法:sudo apt-get install g++-multilib4、Traceback (most recent call last):
File "../repo", line 595, in
main(sys.argv[1:])
File "../repo", line 562, in main
_Init(args)
File "../repo", line 181, in _Init
_CheckGitVersion()
File "../repo", line 210, in _CheckGitVersion
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/usr/lib/python2.6/subprocess.py", line 623, in __init__
errread, errwrite)
File "/usr/lib/python2.6/subprocess.py", line 1141, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
解决办法:sudo apt-get install git5、/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libz.a when searching for -lz
/usr/bin/ld: skipping incompatible //usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible //usr/lib/libz.a when searching for -lz
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
解决办法:sudo apt-get install lib32z1-dev6、/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/libstdc++.a when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/libstdc++.a when searching for -lstdc++解决办法:sudo apt-get install g++-multilib7、/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../libncurses.so when searching for -lncurses
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../libncurses.a when searching for -lncurses
/usr/bin/ld: skipping incompatible /usr/lib/libncurses.so when searching for -lncurses
/usr/bin/ld: skipping incompatible /usr/lib/libncurses.a when searching for -lncurses
/usr/bin/ld: cannot find -lncurses
解决办法:sudo apt-get install lib32ncurses5-dev
8、prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:55:22: error: X11/Xlib.h: 没有那个文件或目录
prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:56:23: error: X11/Xatom.h: 没有那个文件或目录
解决办法:sudo apt-get install libx11-dev
最后就是搞定代码开始编译了
阅读(2747) | 评论(0) | 转发(0) |