biocomfun的个人博客分享 http://blog.sciencenet.cn/u/biocomfun

博文

安装GCC 最快方法

已有 10486 次阅读 2017-9-15 11:56 |个人分类:软件安装|系统分类:科研笔记| GMP, gcc

先下载最新版的GCC


http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-7.2.0/gcc-7.2.0.tar.xz



解压:

tar --xz  -xvf gcc-7.2.0.tar.xz


cd gcc-7.2.0


新手最多的问题是安装包的依赖问题,如下所示:

configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.

Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify

their locations.  Source code for these libraries can be found at

their respective hosting sites as well as at

ftp://gcc.gnu.org/pub/gcc/infrastructure/.  See also

http://gcc.gnu.org/install/prerequisites.html for additional info.  If

you obtained GMP, MPFR and/or MPC from a vendor distribution package,

make sure that you have installed both the libraries and the header

files.  They may be located in separate packages.


而按照这些软件包,费事,配置还麻烦;其实GCC已经替我们想好了,只是大家不知道,

直接运行:

./contrib/download_prerequisites

所有相关的软件就按照好了!!!

然后就可以方便的编译了。




nohup ./configure --disable-multilib --prefix=$PWD/../gcc 1>log 2>err &


nohup make -j 3 1>m.log 2>m.err &


make install


然后大功告成!!














http://wap.sciencenet.cn/blog-717048-1076085.html

上一篇:鱼类性别决定研究的新方法和思路
下一篇:Nanopore 第四代测序技术简介

0

该博文允许注册用户评论 请点击登录 评论 (2 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2021-9-22 20:02

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部