mesos安装前置-->gcc4.8
2015-12-11 00:00
239 查看
摘要: mesos在某些环境下会因gcc版本不够而搭建失败,这里提供一个gcc升级方案,网上各种资料总结而得。
获取GCC 4.8.2包:wget http://gcc.skazkaforyou.com/releases/gcc-4.8.2/gcc-4.8.2.tar.gz
解压缩:tar -xf gcc-4.8.2.tar.gz
安装依赖库 进入到目录gcc-4.8.2 执行./contrib/download_prerequisites
建立编译所需输出目录并到目录里:mkdir gcc-build-4.8.2;cd gcc-build-4.8.2
执行 ../gcc-4.8.2/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib
报错:gcc configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0遂安装这三个工具
此三个安装包有安装顺序 下载好相应安装包后:(GMP4.3.2&MPC1.0.1&MPFR3.1.3)
1.先开始安装GMP。解压GMP的压缩包后,得到源代码目录gmp-4.3.2。在该目录的同级目录下建立一个临时的编译目录,这里命名为tempGMP。
进入tempGMP目录,输入以下命令进行配置:
../gmp-4.3.2/configure --prefix=/home/gmp-4.3.2
make -j4
sudo make install
2.再安装mpfr。解压mpfr的压缩包后,得到源代码目录mpfr-3.1.3。在该目录的同级目录下建立一个临时的编译目录,这里命名为tempMPFR。
进入tempMPFR目录,输入以下命令进行配置:
../mpfr-3.1.3/configure --prefix=/home/mpfr-3.1.3 --with-gmp=/home/gmp-4.3.2
make -j4
sudo make install
2.最后安装mpc。解压mpc的压缩包后,得到源代码目录mpc-1.0.1。在该目录的同级目录下建立一个临时的编译目录,这里命名为tempMPC。
进入tempMPC目录,输入以下命令进行配置:
../mpc-1.0.1/configure --prefix=/home/mpc-1.0.1 --with-gmp=/home/gmp-4.3.2 --with-mpfr=/home/mpfr-3.1.3
make -j4
sudo make install
坑1:在三个插件configure时如遇到 "configure: error: could not find a working compiler"
解决:在命令末尾添加"--build=x86_64-linux"(问题系CPU处理器位数所致)
3个插件安装后 开始重新configure GCC4.8
坑2:GCC configure时报错"configure: error: cannot compute suffix of object files: cannot compile....."
解决:vi/etc/profile
添加export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/mpc-1.0.1/lib:/home/gmp-4.3.2/lib:/home/mpfr-3.1.3/lib
之后运行#source /etc/profile(问题系插件安装后未添加到环境变量)
再次configure GCC4.8
../gcc-4.8.2/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib
坑3:仍然找不到3个插件,错误提示手动添加插件地址,改用如下命令:
../configure --enable-checking=release --enable-languages=c,c++ --disable-multilib --with-gmp=/home/gmp-4.3.2 --with-mpfr=/home/mpfr-3.1.3 --with-mpc=/home/mpc-1.0.1
configure成功后,进行编译
make -j4
make install
编译成功后 gcc -v查看版本 出现gcc version 4.8.2 (GCC) 字样代表安装成功!
获取GCC 4.8.2包:wget http://gcc.skazkaforyou.com/releases/gcc-4.8.2/gcc-4.8.2.tar.gz
解压缩:tar -xf gcc-4.8.2.tar.gz
安装依赖库 进入到目录gcc-4.8.2 执行./contrib/download_prerequisites
建立编译所需输出目录并到目录里:mkdir gcc-build-4.8.2;cd gcc-build-4.8.2
执行 ../gcc-4.8.2/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib
报错:gcc configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0遂安装这三个工具
此三个安装包有安装顺序 下载好相应安装包后:(GMP4.3.2&MPC1.0.1&MPFR3.1.3)
1.先开始安装GMP。解压GMP的压缩包后,得到源代码目录gmp-4.3.2。在该目录的同级目录下建立一个临时的编译目录,这里命名为tempGMP。
进入tempGMP目录,输入以下命令进行配置:
../gmp-4.3.2/configure --prefix=/home/gmp-4.3.2
make -j4
sudo make install
2.再安装mpfr。解压mpfr的压缩包后,得到源代码目录mpfr-3.1.3。在该目录的同级目录下建立一个临时的编译目录,这里命名为tempMPFR。
进入tempMPFR目录,输入以下命令进行配置:
../mpfr-3.1.3/configure --prefix=/home/mpfr-3.1.3 --with-gmp=/home/gmp-4.3.2
make -j4
sudo make install
2.最后安装mpc。解压mpc的压缩包后,得到源代码目录mpc-1.0.1。在该目录的同级目录下建立一个临时的编译目录,这里命名为tempMPC。
进入tempMPC目录,输入以下命令进行配置:
../mpc-1.0.1/configure --prefix=/home/mpc-1.0.1 --with-gmp=/home/gmp-4.3.2 --with-mpfr=/home/mpfr-3.1.3
make -j4
sudo make install
坑1:在三个插件configure时如遇到 "configure: error: could not find a working compiler"
解决:在命令末尾添加"--build=x86_64-linux"(问题系CPU处理器位数所致)
3个插件安装后 开始重新configure GCC4.8
坑2:GCC configure时报错"configure: error: cannot compute suffix of object files: cannot compile....."
解决:vi/etc/profile
添加export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/mpc-1.0.1/lib:/home/gmp-4.3.2/lib:/home/mpfr-3.1.3/lib
之后运行#source /etc/profile(问题系插件安装后未添加到环境变量)
再次configure GCC4.8
../gcc-4.8.2/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib
坑3:仍然找不到3个插件,错误提示手动添加插件地址,改用如下命令:
../configure --enable-checking=release --enable-languages=c,c++ --disable-multilib --with-gmp=/home/gmp-4.3.2 --with-mpfr=/home/mpfr-3.1.3 --with-mpc=/home/mpc-1.0.1
configure成功后,进行编译
make -j4
make install
编译成功后 gcc -v查看版本 出现gcc version 4.8.2 (GCC) 字样代表安装成功!
相关文章推荐
- NC工具安装
- 仿煎蛋jiandan应用客户端源码
- 仿哔哩哔哩应用客户端Android版源码
- 易便签客户端应用ios源码
- 高仿糯米iOS客户端应用项目源码
- CSU 1555(逆序数复原)
- animate.css简介
- //监测网络状态(AFNetworking) 服务端 客户端
- 程序员的小小世界应该懂得事儿
- JavaScript的伪协议
- java项目命名规则
- jsp的标签和EL表达式
- String(字符串API的处理)
- <a>标签调用js方法的方式
- 关于开源中国社区(oschina)发表博客被屏蔽敏感字体
- 怎样更改MindMapper中的边界格式
- 自带的扫码 扫描区域
- eclipse classic添加html之类的web插件
- Error: ShouldNotReachHere()
- ADT创建项目时出现appcompat_v7的问题