||||
ubuntu12.04LTS 系统下安装gamit,主要是编译器和安装配置文件的不一样。其他的可以参考本博客中的《ubuntu10.04LTS 安装GAMIT/GLOBK步骤(Bash环境配)本文亲自总结》一文。以下均在root运行
1、选取编译器
ubuntu12.04LTS版默认编译器为4.6版本,不建议使用,建议使用4.2或者4.4版本,因为4.2版本较老,使用apt-get 已经不能安装,需要手动去网上下载相关软件及其依赖软件,比较麻烦,不推荐。4.4版本使用apt-get 命令依然存在,输入
apt-get install gcc-4.4
apt-get install gfortran-4.4
便会安装了4.4的最新版 4.4.7版。
现在系统中并存了4.4与4.6版本,需要配置默认的gcc及gfortran编译器(4.6的编译器没有安装,如需安装使用 apt-get install gfortran 来安装)
2、配置编译器
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 44
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 46
update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-4.4 40
update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-4.6 46(如果安装了)
update-alternatives --config gcc
根据提示,选择4.4版本的编译器
update-alternatives --config gfortran
根据提示,选择4.4版本的编译器
配置后输入
gcc --version 及 gfortran --version 查看配置的版本
3 、makefile.config文件配置
修改如下,或者使用更新包(说明更新了3.0系统的)中 librariesmakefile.config,替换安装包中librariesmakefile.config
# ----- for Linux from 0.0.1 to 3.0.0 -- #
OS_ID Linux 0001 3462
或者使用更新包(说明更新了3.0系统的)中 librariesmakefile.config,替换安装包中librariesmakefile.config
配置完后其他安装步骤如《ubuntu10.04LTS 安装GAMIT/GLOBK步骤(Bash环境配)本文亲自总结》所述。
如有问题可联系本人 E-mail:zhangyong1361@163.com
张勇 2012-12-31
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-6-3 17:32
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社