Linux切换用户出现错误-mac zsh bash 切换: [/bin/mac zsh bash 切换: No such file or directory

Ubuntu编译Android源码出错及问题解决_Linux教程_Linux公社-Linux系统门户网站
你好,游客
Ubuntu编译Android源码出错及问题解决
来源:Linux社区&
作者:Linux
源码后马上编译会发现有各种各样的错误,原因是有些依赖包没有装。
为了避免出现以下我遇到的错误,请先安装 jdk1.5 ,必须是 jdk1.5,不然肯定编译不过的。
然后,在检查以下有没有安装以下依赖包:
sudo apt-get install bison libc6-dev-amd64 g++-multilib zlib1g-dev lib64z1-dev flex libncurses5-dev libx11-dev gperf
下面是我遇到的错误及解决方法:/bin/bash: bison:找不到命令Checking build tools versions…************************************************************You are attempting to build with the incorrect versionof java.
Your version is: /bin/bash: java:找不到命令.The correct version is: 1.6.
Please follow the machine setup instructions at
http://source.android.com/source/download.html
************************************************************build/core/main.mk:114: *** stop。 停止。
解决方法: sudo apt-get install bison
———————————————————————-
Install: out/host/linux-x86/framework/droiddoc.jartarget Generated: libclearsilver-jni &= out/host/common/obj/JAVA_LIBRARIES/clearsilver_intermediates/javalib.jarhost C: libclearsilver-jni &= external/clearsilver/java-jni/j_neo_util.cIn file included from /usr/include/features.h:378,from /usr/include/string.h:26,from external/clearsilver/java-jni/j_neo_util.c:1:/usr/include/gnu/stubs.h:9:27: error: gnu/stubs-64.h: 没有那个文件或目录make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libclearsilver-jni_intermediates/j_neo_util.o] 错误 1
解决方法: sudo apt-get install libc6-dev-amd64
———————————————————————-
host SharedLib: libneo_util (out/host/linux-x86/obj/lib/libneo_util.so)/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.4.3/libstdc++.so when searching for -lstdc++/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.4.3/libstdc++.a when searching for -lstdc++/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.4.3/libstdc++.so when searching for -lstdc++/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.4.3/libstdc++.a when searching for -lstdc++/usr/bin/ld: cannot find -lstdc++collect2: ld returned 1 exit statusmake: *** [out/host/linux-x86/obj/lib/libneo_util.so] 错误 1
解决方法: sudo apt-get install g++-multilib
———————————————————————-
external/clearsilver/cgi/cgi.c:22:18: error: zlib.h: 没有那个文件或目录external/clearsilver/cgi/cgi.c: In function ‘cgi_compress’:external/clearsilver/cgi/cgi.c:885: error: ‘z_stream’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:885: error: (Each undeclared identifier is reported only onceexternal/clearsilver/cgi/cgi.c:885: error: for each function it appears in.)external/clearsilver/cgi/cgi.c:885: error: expected ‘;’ before ‘stream’external/clearsilver/cgi/cgi.c:888: error: ‘stream’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:888: error: ‘Bytef’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:888: error: expected expression before ‘)’ tokenexternal/clearsilver/cgi/cgi.c:889: error: ‘uInt’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:889: error: expected ‘;’ before ‘str’external/clearsilver/cgi/cgi.c:890: error: expected expression before ‘)’ tokenexternal/clearsilver/cgi/cgi.c:892: error: ‘uLong’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:892: error: expected ‘)’ before ‘stream’external/clearsilver/cgi/cgi.c:895: error: ‘alloc_func’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:895: error: expected ‘;’ before numeric constantexternal/clearsilver/cgi/cgi.c:896: error: ‘free_func’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:896: error: expected ‘;’ before numeric constantexternal/clearsilver/cgi/cgi.c:897: error: ‘voidpf’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:897: error: expected ‘;’ before numeric constantexternal/clearsilver/cgi/cgi.c:900: error: ‘Z_DEFAULT_COMPRESSION’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:900: error: ‘Z_DEFLATED’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:900: error: ‘MAX_WBITS’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:900: error: ‘Z_DEFAULT_STRATEGY’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:901: error: ‘Z_OK’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:904: error: ‘Z_FINISH’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:905: error: ‘Z_STREAM_END’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c: In function ‘cgi_output’:external/clearsilver/cgi/cgi.c:1200: error: ‘Z_NULL’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:1201: error: expected ‘)’ before ‘Bytef’external/clearsilver/cgi/cgi.c:1201: warning: cast from pointer to integer of different sizeexternal/clearsilver/cgi/cgi.c:1218: error: ‘Z_DEFLATED’ undeclared (first use in this function)make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libneo_cgi_intermediates/cgi.o] 错误 1
解决方法: sudo apt-get install zlib1g-dev
———————————————————————-
host SharedLib: libneo_cgi (out/host/linux-x86/obj/lib/libneo_cgi.so)/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../libz.so when searching for -lz/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../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 -lzcollect2: ld returned 1 exit statusmake: *** [out/host/linux-x86/obj/lib/libneo_cgi.so] 错误 1
解决方法: sudo apt-get install lib64z1-dev
———————————————————————-
out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp: In function ‘int yyparse()’:out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp:1827: warning: deprecated conversion from string constant to ‘char*’out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp:1970: warning: deprecated conversion from string constant to ‘char*’Lex: aidl &= frameworks/base/tools/aidl/aidl_language_l.l/bin/bash: flex:找不到命令make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp] 错误 127
解决方法: sudo apt-get install flex
———————————————————————-
Docs droiddoc: out/target/common/docs/api-stubsCould not load ‘clearsilver-jni’java.library.path = out/host/linux-x86/libmake: *** [out/target/common/docs/api-stubs-timestamp] 错误 45
解决方法: 安装 jdk1.5
———————————————————————-
host Executable: adb (out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb)/usr/bin/ld: cannot find -lncursescollect2: ld returned 1 exit statusmake: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] 错误 1
解决方法: sudo apt-get install libncurses5-dev
———————————————————————-
host C: emulator &= external/qemu/android/main.cIn file included from external/qemu/android/main.c:30: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: 没有那个文件或目录In file included from external/qemu/android/main.c:30:prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:73: error: expected specifier-qualifier-list before ‘XEvent’prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:86: error: expected specifier-qualifier-list before ‘Display’external/qemu/android/main.c: In function ‘main’:external/qemu/android/main.c:1281: warning: implicit declaration of function ‘audio_check_backend_name’make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator_intermediates/android/main.o] 错误 1
解决方法: sudo apt-get install libx11-dev
———————————————————————-
Generating CSSPropertyNames.h &= CSSPropertyNames.insh: gperf: not foundcalling gperf failed: 32512 at ./makeprop.pl line 96.make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames.h] 错误 25make: *** 正在删除文件“out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames.h”
解决方法:sudo apt-get install gperf
10.04编译android1.5源码出错问题解决
环境:Ubuntu10.04&&&& android1.5源码
(1)/bin/bash: bison: command not found解决:$ sudo apt-get install bison(2)make: *** No rule to make target `Please-install-JDK-5.0,-update-12-or-higher,-which-you-can-download-from-java.sun.com’,needed by `out/target/common/docs/api-stubs-timestamp’.& Stop.解决:安装JDK 5.01):根据官方文档里所说,源代码的编译必须使用JDK5才能编译的了,所以这里我们使用jdk52): 需要先更新源,在终端里执行 sudo vim /etc/apt/sources.list3): 在source.list里把以下2行拷贝到文档最后面:deb http://us.archive.ubuntu.com/ubuntu/ jaunty multiversedeb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse保存退出。4): 执行 sudo apt-get update 更新源.5): 配置编译环境并下载JDK5:sudo apt-get install sun-java5-jdk(3)/bin /bash: g++: command not foundmake: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/pseudolocalize.o] Error 127解决:$ sudo apt-get install build-essential(4)external/clearsilver/cgi /cgi.c:22:18: error: zlib.h: No such file or directoryexternal/clearsilver/cgi/cgi.c: In function ‘cgi_compress’:external/clearsilver/cgi/cgi.c:885: error: ‘z_stream’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:885: error: (Each undeclared identifier is reported only onceexternal/clearsilver/cgi/cgi.c:885: error: for each function it appears in.)external/clearsilver/cgi/cgi.c:885: error: expected ‘;’ before ‘stream’external/clearsilver/cgi/cgi.c:888: error: ‘stream’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:888: error: ‘Bytef’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:888: error: expected expression before ‘)’ tokenexternal/clearsilver/cgi/cgi.c:889: error: ‘uInt’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:889: error: expected ‘;’ before ‘str’external/clearsilver/cgi/cgi.c:890: error: expected expression before ‘)’ tokenexternal/clearsilver/cgi/cgi.c:892: error: ‘uLong’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:892: error: expected ‘)’ before ‘stream’external/clearsilver/cgi/cgi.c:895: error: ‘alloc_func’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:895: error: expected ‘;’ before numeric constantexternal/clearsilver/cgi/cgi.c:896: error: ‘free_func’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:896: error: expected ‘;’ before numeric constantexternal/clearsilver/cgi/cgi.c:897: error: ‘voidpf’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:897: error: expected ‘;’ before numeric constantexternal/clearsilver/cgi/cgi.c:900: error: ‘Z_DEFAULT_COMPRESSION’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:900: error: ‘Z_DEFLATED’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:900: error: ‘MAX_WBITS’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:900: error: ‘Z_DEFAULT_STRATEGY’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:901: error: ‘Z_OK’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:904: error: ‘Z_FINISH’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:905: error: ‘Z_STREAM_END’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c: In function ‘cgi_output’:external/clearsilver/cgi/cgi.c:1200: error: ‘Z_NULL’ undeclared (first use in this function)external/clearsilver/cgi/cgi.c:1201: error: expected ‘)’ before ‘Bytef’external/clearsilver/cgi/cgi.c:1218: error: ‘Z_DEFLATED’ undeclared (first use in this function)make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libneo_cgi_intermediates/cgi.o] Error 1解决:$ sudo apt-get install zlib1g-dev(5)/bin/bash: flex: command not foundmake: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp] Error 127解决:$ sudo apt-get install flex(6)/usr/bin/ld: cannot find -lncursescollect2: ld returned 1 exit statusmake: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] Error 1解 决:$ sudo apt-get install libncurses-dev(7)prebuilt/linux-x86/sdl /include/SDL/SDL_syswm.h:55:22: error: X11/Xlib.h: No such file or directoryprebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:56:23: error: X11/Xatom.h: No such file or directoryIn file included from external/qemu/android/skin/window.c:19:prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:73: error: expected specifier-qualifier-list before ‘XEvent’prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:86: error: expected specifier-qualifier-list before ‘Display’make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator_intermediates/android/skin/window.o] Error 1解决:$ sudo apt-get install libx11-dev(8)sh: gperf: not foundcalling gperf failed: 32512 at ./makeprop.pl line 96.make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames.h] Error 25make: *** Deleting file `out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames.h’解 决:$ sudo apt-get install gperf
(9)frameworks/policies/base/PolicyConfig.mk:22: *** No module defined for the given PRODUCT_POLICY (android.policy_phone).& Stop.错误。解决办法:在build/tools/findleaves.sh中的第89行,这一句find “${@:0:$nargs }” $findargs -type f -name “$filename” -print |改为find “${@:1:$nargs-1 }” $findargs -type f -name “$filename” -print |(10)frameworks/base/tools/aidl/AST.cpp:10: error: ‘fprintf’ was not declared in this scope的错误解决办法:下载gcc-4.3和g++-4.3apt-get install gcc-4.3 g++-4.3大约十多兆,然后进入/usr/bincd /usr/bin建个软连接ln -s gcc-4.3 gccln -s g++-4.3 g++
相关资讯 & & &
& (07/13/:14)
& (08/11/:27)
& (05/06/:13)
& (04/17/:32)
& (05/31/:15)
& (04/02/:07)
   同意评论声明
   发表
尊重网上道德,遵守中华人民共和国的各项有关法律法规
承担一切因您的行为而直接或间接导致的民事或刑事法律责任
本站管理人员有权保留或删除其管辖留言中的任意内容
本站有权在网站内转载或引用您的评论
参与本评论即表明您已经阅读并接受上述条款Linux下编译出现这个bash:./configure:No such file or directory 怎么解决_百度知道
Linux下编译出现这个bash:./configure:No such file or directory 怎么解决
我有更好的答案
你先看一下目录下的文件组成如果有config.in文件可以通过autoconf 来自动生成 configure文件
这个文件在哪
相看对应的报错目录因为Linux下编译的源码是很多样性的如果你是下面的子目录里报这个错误,那么你就要到该子目录进行检查通常文件调用是这么一种默认文件名形式请参考:
那就是在当前目录没有configure这个文件,你这个命令的意思是执行当前目录下面的configure,bash找不到,然后就报错了。如果是解压的源码,一般都是生成好的configure文件,你看看是不是你的目录没有搞对,解压之后,是要进入那个解压了的目录的。。。比如tar zxf abc-1.2.1.
./make && make install
本回答被网友采纳
尽快的熟悉一下编译源码包方式安装的一些知识,就很容易解决这些问题。很多时候 不要仅仅对单个问题来寻找答案,要找问题的本质,巩固知识的基础。希望可以帮到你,祝你早日解决问题。
1条折叠回答
为您推荐:
其他类似问题
configure的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。bin/bash: bad interpreter: No such file or directory
dos2unix while.sh
请尊重知识,请尊重原创 更多资料参考请见
浏览: 164404 次
来自: 广州
啊喔,过去了这么久,不过还是评一个。谁说uuid的hashCo ...
yclovesun 写道使用了uuid,为什么还要machin ...
使用了uuid,为什么还要machineId?uuid已经可以 ...
太深奥,看不懂
(window.slotbydup=window.slotbydup || []).push({
id: '4773203',
container: s,
size: '200,200',
display: 'inlay-fix'}

我要回帖

更多关于 git bash 切换目录 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信