一.make版本

1.下载make的压缩包

ftp://ftp.gnu.org/gnu/make/

2.解压,安装

cd make-x.x
./configuration
sh build.sh
sudo make install

3.查看版本信息

make -v

二.gcc版本

1.使用命令安装gcc,以gcc-4.7为例,具体版本请自行决定

sudo apt-get install gcc-4.7 g++-4.7 g++-4.7-multilib gcc-4.7-multilib

2.若出现无法定位软件包,请添加源,并更新源

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update

3.切换gcc版本,如从gcc4.7切换到gcc4.4

update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.4
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.7
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7
update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-4.4
update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-4.7

  也可以使用如下命令,根据需求去选择

sudo update-alternatives --config gcc
sudo update-alternatives --config g++
sudo update-alternatives --config cpp

4.查看版本信息

gcc -v
g++ -v

三.jdk版本

说明:Android4.x之前请使用jdk1.6,Android5.x请使用openjdk7

1.安装jdk,以jdk1.6.0_45为例

  1.1 到官网选择具体的jdk版本下载:

    http://www.oracle.com/technetwork/java/javase/archive-139210.html

  1.2 复制到/usr/lib/jvm下

sudo cp jdk-6u45-linux-x64.bin /usr/lib/jvm

  1.3 增加可执行权限

sudo chmod  jdk-6u45-linux-x64.bin

  1.4 解压

sudo ./jdk-6u45-linux-x64.bin

  1.5 配置环境变量

sudo gedit /etc/environment

    在最后添加如下信息,保存退出

export PATH=/usr/lib/jvm/jdk1.6.0_45/bin:$PATH

    使用如下命令使环境变量生效

source /etc/environment

2.配置jdk,其中Android4.0不需要配置javap,而Android4.4以上版本需要配置

update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.6.0_45/bin/java"
update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.6.0_45/bin/javac"
update-alternatives --install "/usr/bin/javadoc" "javadoc" "/usr/lib/jvm/jdk1.6.0_45/bin/javadoc"
update-alternatives --install "/usr/lib/mozilla/plugins/libjavaplugin.so" "mozilla-javaplugin.so" "/usr/lib/jvm/jdk1.6.0_45/jre/lib/amd64/libnpjp2.so"
update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.6.0_45/bin/javaws"
update-alternatives --install "/usr/bin/javap" "javap" "/usr/lib/jvm/jdk1.6.0_45/bin/javap"
update-alternatives --install "/usr/bin/jar" "jar" "/usr/lib/jvm/jdk1.6.0_45/bin/jar"

3.更新jdk配置

sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javadoc
sudo update-alternatives --config mozilla-javaplugin.so
sudo update-alternatives --config javaws
sudo update-alternatives --config javap
sudo update-alternatives --config jar

4.查看版本信息

java -version
javac -version

四.bison版本

1.下载bison的压缩包

http://ftp.gnu.org/gnu/bison/

2.解压,安装

cd bison-x.x
./configure
make
sudo make install

  Bison版本不对,可能会引发如下错误(以下错误基于Bison3.0.4与Bison3.0.2,Bison2.7.1不会报该错误

 In file included from plural.y:::
plural-exp.h::: error: conflicting types for 'libintl_gettextparse'
# define PLURAL_PARSE libintl_gettextparse
^
plural.y::: note: in expansion of macro 'PLURAL_PARSE'
# define __gettextparse PLURAL_PARSE
^
plural.c::: note: in expansion of macro '__gettextparse'
int __gettextparse (void);
^
plural-exp.h::: note: previous declaration of 'libintl_gettextparse' was here
# define PLURAL_PARSE libintl_gettextparse
^
plural-exp.h::: note: in expansion of macro 'PLURAL_PARSE'
extern int PLURAL_PARSE (void *arg);
^
plural-exp.h::: error: conflicting types for 'libintl_gettextparse'
# define PLURAL_PARSE libintl_gettextparse
^
plural.y::: note: in expansion of macro 'PLURAL_PARSE'
# define __gettextparse PLURAL_PARSE
^
plural.c::: note: in expansion of macro '__gettextparse'
#define yyparse __gettextparse
^
plural.c::: note: in expansion of macro 'yyparse'
yyparse (void)
^
plural-exp.h::: note: previous declaration of 'libintl_gettextparse' was here
# define PLURAL_PARSE libintl_gettextparse
^
plural-exp.h::: note: in expansion of macro 'PLURAL_PARSE'
extern int PLURAL_PARSE (void *arg);
^
plural.c: In function 'libintl_gettextparse':
plural.c::: error: too few arguments to function '__gettextlex'
yychar = yylex (&yylval);
^
plural.c::: note: declared here
#define yylex __gettextlex
^
plural.y::: note: in expansion of macro 'yylex'
static int yylex (YYSTYPE *lval, const char **pexp);
^
plural.y::: error: 'arg' undeclared (first use in this function)
((struct parse_args *) arg)->res = $;
^
plural.y::: note: each undeclared identifier is reported only once for each function it appears in
Makefile:: recipe for target 'plural.o' failed
make[]: *** [plural.o] Error

更改Android编译软件版本(make/gcc/bision)的更多相关文章

  1. 编译lua版本问题

    Compile++ thumb  : game_shared <= main.cppjni/hellocpp/main.cpp: In function 'void Java_org_cocos ...

  2. linux 重新编译低版本gcc

    编程实践中,可能会遇到需要较低版本gcc以兼容相应程序的需求,这时就需要我们将系统中默认的gcc版本较低,或者重新编译生成.(UBUNTU12.04下实现gcc4.2.3) 方法1: 对于UBUNTU ...

  3. android 检查软件是否有更新版本

    import java.net.HttpURLConnection; import java.net.URL; import java.util.HashMap; import com.yuxin.m ...

  4. Android编译环境折腾记

    题记:感觉是时候写点什么了=_=! 第一次安装了ubuntu14.04.5,官网下载的iso,官网下的jar,编译android4.x需要安装jdk6,更高的版本会有问题,baidu到很多搭建环境的步 ...

  5. Ubuntu 16.04下为Android编译OpenCV 3.2.0 Manager

    http://johnhany.net/2016/07/build-opencv-manager-for-android-on-ubuntu/ 最近想在Android上尝试一下SIFT和SURF匹配算 ...

  6. Android编译过程详解(一)

    Android编译过程详解(一) 注:本文转载自Android编译过程详解(一):http://www.cnblogs.com/mr-raptor/archive/2012/06/07/2540359 ...

  7. Android勒索软件研究报告

    Android勒索软件研究报告 Author:360移动安全团队 0x00 摘要 手机勒索软件是一种通过锁住用户移动设备,使用户无法正常使用设备,并以此胁迫用户支付解锁费用的恶意软件.其表现为手机触摸 ...

  8. Android编译环境——ubuntu12.04上android2.3.4编译错误以及解决

    Android编译环境——ubuntu12.04上android2.3.4编译错误以及解决 分类: android应用开发2013-08-21 09:20 4222人阅读 评论(3) 收藏 举报 li ...

  9. [转载]哪个版本的gcc才支持c11

    转自:https://blog.csdn.net/haluoluo211/article/details/71141093 哪个版本的gcc才支持c11 2017年05月03日 19:25:43 Fi ...

随机推荐

  1. [Training Video - 6] [File Reading] [Java] Create and Write Excel File Using Apache POI API

    package com.file.properties; import java.io.File; import java.io.FileNotFoundException; import java. ...

  2. VC6.0 中 添加/取消 块注释的Macro代码

    SAMPLE.DSM是微软提供的样例,使用的是vb语言.其中的 CommentOut 函数,是支持块注释的,可是这种/**/的注释方式,有时候用起来不是很方便,因为两个/会因为一个/而终止.对于大块代 ...

  3. Golang 之 Base62 编码

    Base62 编码用62个可见字符来编码信息,也就是所谓的62进制,可用于缩短地址之类的.实现起来也很简单.当然,这个实现跟别人家的有可能不一样,反正自己能编能解就行. package main im ...

  4. 网站配置新的YII2可运行版本

    1. config 中的 gitignore 先将 -local 加入版本库 2. 将 runtime 目录添加写权限 3. 将web目录的asset 添加写的权限 4.

  5. (2)WePHP 控制器与使用模板

    <?php class C_index extends Action { public function __initialize() { echo"自动执行"; } pub ...

  6. ARM启动代码中_main 与用户主程序main()的区别

    1.1  问题描述     __main函数的作用是什么呀?1.2  问题剖析     __main函数是C/C++运行时库的一个函数,嵌入式系统在进入应用主程序之前必须有一个初始化的过程,使用__m ...

  7. CodeForces 519E A and B and Lecture Rooms(倍增)

    A and B are preparing themselves for programming contests. The University where A and B study is a s ...

  8. Python之模块一

    1 >模块介绍: 模块,用一坨代码实现了某个功能的代码集合,类似于函数式编程和面向过程编程,函数式编程则完成一个功能,其他代码用来调用即可,提供了代码的          重用性和代码间的吻合, ...

  9. VS 和Visual Assist X快捷键(转)

    Visual Assist X 最有用的快捷键 1.Alt + G: 在定义与声明之间互跳. 2.Alt + O: 在.h与.cpp之间互跳.(O是字母O,不是数字零) 3.Alt + Shift + ...

  10. PyCharm社区版+Django搭建web开发环境-2

    接上一篇:PyCharm社区版+Django搭建web开发环境-1 1. 创建好django项目并建立app应用:web 2. setting.py:配置app应用 INSTALLED_APPS = ...