/bin/bash: bison: command not found

/bin/bash: bison: command not found
解决方法:

android 编译源码 错误解决


  1.下载源码android-2.1_r2,直接make

  2.出错及解决如下:

  (1)/bin/bash: bison: command not found

  解决:a@ubuntu:~/work/android-2.1_r2$ 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.0

  1):根据官方文档里所说,源代码的编译必须使用JDK5才能编译的了,所以这里我们使用jdk5

  2): 需要先更新源,在终端里执行 sudo vim /etc/apt/sources.list

  3): 在source.list里把以下2行拷贝到文档最后面:

  deb http://us.archive.ubuntu.com/ubuntu/ jaunty multiverse

  deb 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 found

  make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/pseudolocalize.o] Error 127

  解决:a@ubuntu:~/work/android-2.1_r2$ sudo apt-get install build-essential

  (4)external/clearsilver/cgi/cgi.c:22:18: error: zlib.h: No such file or directory

  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 once

  external/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 ‘)’ token

  external/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 ‘)’ token

  external/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 constant

  external/clearsilver/cgi/cgi.c:896: error: ‘free_func’ undeclared (first use in this function)

  external/clearsilver/cgi/cgi.c:896: error: expected ‘;’ before numeric constant

  external/clearsilver/cgi/cgi.c:897: error: ‘voidpf’ undeclared (first use in this function)

  external/clearsilver/cgi/cgi.c:897: error: expected ‘;’ before numeric constant

  external/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

  解决:a@ubuntu:~/work/android-2.1_r2$ sudo apt-get install zlib1g-dev

  (5)/bin/bash: flex: command not found

  make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp] Error 127

  解决:a@ubuntu:~/work/android-2.1_r2$ sudo apt-get install flex

  (6)/usr/bin/ld: cannot find -lncurses

  collect2: ld returned 1 exit status

  make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] Error 1

  解决:a@ubuntu:~/work/android-2.1_r2$ 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 directory

  prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:56:23: error: X11/Xatom.h: No such file or directory

  In 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

  解决:a@ubuntu:~/work/android-2.1_r2$ sudo apt-get install libx11-dev

  (8)sh: gperf: not found

  calling gperf failed: 32512 at ./makeprop.pl line 96.

  make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames.h]

Error 25

  make: *** Deleting file `out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames.h'

  解决:a@ubuntu:~/work/android-2.1_r2$ sudo apt-get install gperf

  http://hi.baidu.com/maxgoto/blog/item/fa000f7bf01135f80ad187d8.html

  Ubuntu 9.10系统Android 2.1编译笔记


发布了0 篇原创文章 · 获赞 1 · 访问量 3万+
展开阅读全文

bash: rt: 未找到命令... (profile中没有 “tr”)

12-12

linux执行 “source /etc/profile” 时提示 “bash: rt: 未找到命令... 相似命令是: 'tr' ” 但是在profile中找了半天没发现“tr”,下面是源码 ,请哪位大神帮忙看看!!!万分感谢~~ ``` # /etc/profile # System wide environment and startup programs, for login setup # Functions and aliases go in /etc/bashrc # It's NOT a good idea to change this file unless you know what you # are doing. It's much better to create a custom.sh shell script in # /etc/profile.d/ to make custom changes to your environment, as this # will prevent the need for merging in future updates. pathmunge () { case ":${PATH}:" in *:"$1":*) ;; *) if [ "$2" = "after" ] ; then PATH=$PATH:$1 else PATH=$1:$PATH fi esac } if [ -x /usr/bin/id ]; then if [ -z "$EUID" ]; then # ksh workaround EUID=`/usr/bin/id -u` UID=`/usr/bin/id -ru` fi USER="`/usr/bin/id -un`" LOGNAME=$USER MAIL="/var/spool/mail/$USER" fi # Path manipulation if [ "$EUID" = "0" ]; then pathmunge /usr/sbin pathmunge /usr/local/sbin else pathmunge /usr/local/sbin after pathmunge /usr/sbin after fi HOSTNAME=`/usr/bin/hostname 2>/dev/null` HISTSIZE=1000 if [ "$HISTCONTROL" = "ignorespace" ] ; then export HISTCONTROL=ignoreboth else export HISTCONTROL=ignoredups fi export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL # By default, we want umask to get set. This sets it for login shell # Current threshold for system reserved uid/gids is 200 # You could check uidgid reservation validity in # /usr/share/doc/setup-*/uidgid file if [ $UID -gt 199 ] && [ "`/usr/bin/id -gn`" = "`/usr/bin/id -un`" ]; then umask 002 else umask 022 fi for i in /etc/profile.d/*.sh /etc/profile.d/sh.local ; do if [ -r "$i" ]; then if [ "${-#*i}" != "$-" ]; then . "$i" else . "$i" >/dev/null fi fi done unset i unset -f pathmunge ``` 问答

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览