更改make/bison的版本
一.make版本
1.下载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的压缩包
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
更改make/bison的版本的更多相关文章
- SVN 安装配置详解,包含服务器和客户端,外带一个项目演示,提交,更改,下载历史版本,撤销
本次要介绍的是svn版本管理工具包含2个: 服务器端:visualsvn server 下载地址为:https://www.visualsvn.com/server/download/ 此处演示的 ...
- 更改Ubuntu默认python版本的方法
当你安装 Debian Linux 时,安装过程有可能同时为你提供多个可用的 Python 版本,因此系统中会存在多个 Python 的可执行二进制文件.一般Ubuntu默认的Python版本都为2. ...
- 更改Ubuntu默认python版本的两种方法python-> Anaconda
当你安装 Debian Linux 时,安装过程有可能同时为你提供多个可用的 Python 版本,因此系统中会存在多个 Python 的可执行二进制文件.一般Ubuntu默认的Python版本都为2. ...
- ubuntu 更改python3为默认版本
ubuntu 自带两个python版本,一个是python2一个是python3 默认版本是python2的,想要更改ubuntu python3 为默认版本, 只需要两行命令: sudo updat ...
- 如何更改tomcat7及以上版本内存设置
http://jingyan.baidu.com/article/295430f1c22a940c7e0050fb.html?qq-pf-to=pcqq.c2c 当在tomcat的webapps文件夹 ...
- 更改Android编译软件版本(make/gcc/bision)
一.make版本 1.下载make的压缩包 ftp://ftp.gnu.org/gnu/make/ 2.解压,安装 cd make-x.x ./configuration sh build.sh su ...
- Pycharm使用中背景颜色和更改项目的Python版本
一.背景颜色 颜色是每一个人都会去更改的,而且可以保护眼睛! 第二步: 选择图中画框的位置,便可以更改背景颜色! 二.项目版本的更改: python2 和 python3 有很大的不同,使用pytho ...
- Android Studio更改项目SDK的版本
Elipse 中的安卓项目,在Android Studio中可以通过File -->new -- > Import Project的方法建立起来.但是有时候需要用到更改项目的API Lev ...
- 怎么更改maven工程jdk版本(默为1.5,怎么更改jdk版本为1.8)
使用maven 创建工程更改默认jdk版本(1.5)方法 step1: 找到自己项目的pom.xml文件,添加下图黄色区域代码(文末附上的有代码:可以直接复制) step2: 保存一下更改后的的pom ...
随机推荐
- 3173: [Tjoi2013]最长上升子序列
原题:http://www.lydsy.com/JudgeOnline/problem.php?id=3173 题解:促使我写这题的动力是,为什么百度遍地是Treap,黑人问号??? 这题可以用线段树 ...
- JavaScript语言精粹读书笔记 - JavaScript函数
JavaScript是披着C族语言外衣的LISP,除了词法上与C族语言相似以外,其他几乎没有相似之处. JavaScript 函数: 函数包含一组语句,他们是JavaScript的基础模块单元,用于代 ...
- 获得本app的版本号
话不多说,直接贴代码 PackageManager manager; PackageInfo info = null; manager = this.getPackageManager(); try ...
- phpcms V9 内容模型管理
[1]理解模型 模型,系统知识的抽象表示.既然抽象了,那就得脑补一下.大家都是面向对象设计的专业人员,类就很抽象的,对比类的定义想象一下模型的概念. 举个例子,一般新闻类的信息,都具有标题.内容.作者 ...
- 初始python第三天(三)
全局变量与局部变量 1.什么是全局变量 在globals中的变量,都是全局变量,全局变量的作用域就是整个程序 NAME = 'alex' def global_test(): name = 'alex ...
- cookie 的创建 得到 删除
//设置cookie function setCookie(attr,value,time){ if(time){ var newtime=new Date(); newtime.setTime(ne ...
- samba
在/home/下有多个用户目录A.B...,现通过samba共享,要求A用户对A用户组目录具有root权限,对其他目录具有 读权限,B用户对B目录具有root权限,对其他目录只读.并在登陆各个目录时要 ...
- window 下 xampp 上 安装memcached
1.下载memcache 的window 稳定版,解压到xampp 目下;比如D:\xampp\memcached 2. 打开cmd 命令界面 输入 D:\xampp\memcached\ memca ...
- 显示Class 'Think\Controller\FuController' not found和Call to a member function assign() on a non-object 的错误问题
Class 'Think\Controller\FuController' not found 错误位置 FILE: D:\wamp\www\tinkphp\Application\Come\Cont ...
- SQL锁死解决办法
SQL Server 表,记录 死锁解决办法 1. 先根据以下语句 查询 哪些表被 死锁,及 死锁的 spid SELECT request_session_id spid,OBJECT_NAME(r ...