docker安装gamit_科学网—ubuntu下安装gamit 安装 - 贺小星的博文
转载自:ubuntu下安装gamit_藏匿的锋芒_百度空间参考链接1. http://www.5dlinux.com/article/1/2008/linux_15236.html2. http://hi.baidu.com/zzh_my/blog/item/9258bd031a032d7f3812bb04.html目前网络上在ubuntu基础上安装gamit最详细的资料就是一篇(原作者的博客曾经找到过,但这次参考了zzh-my的转载文章)从安装的过程来看,ubuntu在台式机上会安装gcc,但是笔记本上则不会,所以在第一次装的时候并没有成功,虽然从头到尾都安装了,没有中断,但最后采用doy验证的时候没有通过。下文是根据原文加自己的安装过程,总结出的内容,蓝色为原文,内容可能上下有出入,但不影响安装。出入的部分主要是软件的版本显示问题(原文是10.34,我安装的是10.35)和安装路径。首先,安装GCC,因为在root模式下,命令行没有sudoapt-get build-dep gcc链接1采用两种方法,比较了大小后决定采用第一条,就是上面的命令。通过gcc --version确认版本为 GCC 4.3.3
Gamit安装需要csh(tcsh)环境、 GNU gfortran 4.2编译器和libx11-dev库支持。gfortran是软件推荐使用的编译器。libx11-dev是X11的程序开发库,它提供的lib.h和 libx11.a(libx11.so)是Gamit安装必须用到的两个库文件,主要是为Globk的提供图形库支持。以上三个条件却一不可。
ubuntu系统没有csh,默认为bash。因此要先安装csh。
ubuntu系统自带了gcc4.2,但是却没有安装gfortran编译器。而你安装时安装程序会调用默认的gfortran编译器,除非你指定gcc为你的编译器。
首先,以root身份登录,打开终端,输入
apt-get install csh
系统自动下载并安装csh,安装完成后在终端输入
chsh
提示
正在更改 root 的 SHELL
请输入新值,或直接敲回车键以使用默认值
登录 Shell [/bin/bash]:
输入
/bin/csh
修改bash为csh。重新起动ubuntu,并以root身份登录,打开终端,输入
# echo $SHELL
返回s“/bin/csh”,说明SHELL修改成功。
接着输入
apt-get install gfortran
系统自动下载并安装gfortran。
在输入
apt-get install libx11-dev
系统自动下载并安装libx11-dev库支持。安装gamit 10.35定位到gamit的下载路径(即安装路径)准备工作:chmod +x install_software修改install_software文件内容“usr -name libX11.a”为"usr -name libX11.so",一个是静态共享库,一个是动态共享库。makefile.config,修改:# X11 library location - uncomment the appropriate one for your system# Generic (will work on any system if links in place)X11LIBPATH /usr/lib/X11X11INCPATH /usr/include/X11# Specific for Sun with OpenWindows#X11LIBPATH /usr/openwin/lib#X11INCPATH /usr/openwin/share/include/X11# Specific for PC Solaris 10#X11LIBPATH /usr/openwin/lib/#X11INCPATH /usr/openwin/share/include/X11# Specific to Linux RedHat 7,8 and 9, RH-FC1 -> 3#X11LIBPATH /usr/X11R6/lib#X11INCPATH /usr/X11R6/include/X11# Specific to FC5#X11LIBPATH /usr/lib#X11INCPATH /usr/include/X11# Specific for MIT HP and Sun for Release 5#X11LIBPATH /usr/lib/X11R5#X11INCPATH /usr/include/X11R5# Specific for IBM AIX4.2#X11LIBPATH /usr/lpp/X11/lib#X11INCPATH /usr/lpp/X11/include# Specific for MacOSX#X11LIBPATH /usr/X11R6/lib#X11INCPATH /usr/include/X11为:# X11 library location - uncomment the appropriate one for your system# Generic (will work on any system if links in place)#X11LIBPATH /usr/lib/X11#X11INCPATH /usr/include/X11# Specific for Sun with OpenWindows#X11LIBPATH /usr/openwin/lib#X11INCPATH /usr/openwin/share/include/X11# Specific for PC Solaris 10#X11LIBPATH /usr/openwin/lib/#X11INCPATH /usr/openwin/share/include/X11# Specific to Linux RedHat 7,8 and 9, RH-FC1 -> 3#X11LIBPATH /usr/X11R6/lib#X11INCPATH /usr/X11R6/include/X11# Specific to FC5(F6,F7,F8 )X11LIBPATH /usr/libX11INCPATH /usr/include/X11# Specific for MIT HP and Sun for Release 5#X11LIBPATH /usr/lib/X11R5#X11INCPATH /usr/include/X11R5# Specific for IBM AIX4.2#X11LIBPATH /usr/lpp/X11/lib#X11INCPATH /usr/lpp/X11/include# Specific for MacOSX#X11LIBPATH /usr/X11R6/lib#X11INCPATH /usr/include/X11
gamit/libraries压缩包里,修改Makefile.config/Makefile.config.bak中的一组参数
MAXSIT 55
MAXSAT 32
MAXATM 13
MAXEPC 2880
将MAXATM改为25。执行 ./install_software
安装程序install_software启动,搜索安装目录/opt/gamit10.34下的全部压缩文件,提示
GAMIT and GLOBK to be installed into /opt/gamit10.34
If you need help with command line options type CTL_C now and type
install_software -help on the command line
The compressed tarfiles will be removed after extraction of the
directories, but except for that, the script may be stopped and
rerun safely from any point. Tarfiles to be uncompressed:
com.10.34.tar.Z etopo5.grd.10.0.tar example.10.34.tar.Z gamit.10.34.tar.Z help.10.34.tar.Z kf.10.34.tar.Z libraries.10.34.tar.Z maps.10.1.tar.Z tables.10.34.tar.Z
Continue ? (y/n)
输入字母“y”,开始解压缩安装文件,
.. uncompressing and extracting the directories:
Do you want to apply incremental updates: incremental_updates.080812.tar.Z incremental_updates.080919.tar.Z incremental_updates.081022.tar.Z
Continue ? (y/n)
输入字母“y”,开始解压缩安装文件,
.. applying incremental updates:
.. adding /opt/gamit10.34/com to your search path to continue installation
To execute GAMIT and GLOBK you will need to set your login path to
include /opt/gamit10.34/com /opt/gamit10.34/gamit/bin /opt/gamit10.34/kf/bin
You will also need the alias or link gg --> /opt/gamit10.34
Your Operating System type is: Linux
Your default awk version is: /usr/bin/awk
These are the default paths to X11 found in Makefile.config
X11LIBPATH: /usr/lib/X11
X11INCPATH: /usr/include/X11
Searching your system for X11 installation
Found these paths to X11 libs and includes on your system
X11LIBPATH: /usr/lib
X11INCPATH: /usr/include/X11
Are these correct for your system?
Continue? (y/n)
输入字母“y”,提示
GAMIT dimensions in /libraries/Makefile.config are set to
maxsit = 55
maxepc = 2880
maxatm = 25
maxsat = 32
Are these defaults found in Makefile.config correct?
If NOT edit the Makefile.config now before choosing to contine
Continue ? (y/n)
输入字母“y”,开始安装。安装最后会提示
++++++++++++++++++
GLOBK installed
++++++++++++++++++
Create the gg link in your home directory to the version of
gamit/globk you just installed ? (y/n)
输入字母“y”,回车,显示
Making required ~/gg link to newly installed software
ln -s -f /opt/gamit10.34 ~/gg
Don't forget to set your : path to include /opt/gamit10.34/gamit/bin and /opt/gamit10.34/kf/bin
: HELP_DIR environment variable in you shell profile
(in .cshrc/.tcshrc add: setenv HELP_DIR /opt/gamit10.34/help/)
: INSTITUTE evnironment variable in your shell profile
(in your .cshrc/.tcshrc add: setenv INSTITUTE where_i_work)
where_i_work is a 3 character identifier for your solutions
至此,软件已经安装成功。但要始软件能够正常使用,还要修改“主文件夹”下的“.cshrc”文件.该文件是用户的C SHELL配置文件,默认为隐藏文件。必须将Gamit的安装目录添加在里面,否则将无法在终端使用Gamit命令进行数据解算。
由于ubuntu默认使用bash,所以,用户主目录下并没有csh的配置文件,你需要在自己的主文件夹下建立一个“.cshrc”文件,并输入内容如下
#
# This file is applicable to all C-shell users.
# set prompt
set prompt = "[`echo $cwd`]% "
set history = 50
set gamitpath = /opt/gamit10.34
set path = (. /bin /sbin /ect /usr/bin /usr/sbin /usr/ucb /usr/bin/X11 /usr/X11R6/bin $path)
set path = (. /usr/local/gmt/bin /usr/local/bin /usr/local/sbin /usr/local/lib /usr/lib $path)
#set path = (. /usr/local/gmt/bin /usr/local/bin /usr/local/lib /usr/ucb/ nfs r0 soft0 0 $path)
set path = (. gamitpath/gamit/bingamitpath/kf/bin gamitpath/compath)
setenv HELP_DIR $gamitpath/help/
setenv PATH "/usr/sbin:/sbin:${PATH}"
setenv MANPATH /usr/local/gmt/man:/usr/local/man:/usr/X11R6/man
setenv LIBPATH /usr/local/gmt/lib:/usr/lib:/usr/local/lib:/usr/i386-glibc21-linux/lib
#set gcclib direction
setenv LD_LIBRARY_PATH /usr/local/gcc-3.4.1/lib/
# set alias
alias cd 'cd \!*; set prompt = "[`echo $cwd`]% "'
alias pwd 'echo $cwd'
alias ls 'ls --classify'
alias ll 'ls -l'
alias la 'ls -a'
alias rm 'rm -i'
alias mv 'mv -i'
保存,OK,全部安装完成。在终端输入
doy
返回
DOY: Converts various date formats
DOY: Converts various date formats.
Runstring:
% doy
or
% doy W
or
% doy Y
where jd is Julian date (assumed if only one argument)
year is calender year
doy is day of year (assumed if two arguments)
month is month
day is day of month.
hr min is hrs and minutes of day (Only if ymd form used).
In the second form (i.e. W appended to the first value),
the entries are assumed to gps week no and the second entry
(optional) is either gps day of week (0-6) or seconds of
gps week.
NOTE: GPS Day of Week runs from 0-6 (Changed May 20, 1997).
In the third form with Y appended, the argument is taken as
deciminal year. (Versions after 2004/12/21 correctly account
for leap years in converting deciminal years back to Julian dates)
The conversions made are based on the number of arguments
passed.
NDOY: Version of doy of year which takes keyboard input in the
forms above. (^D ends program input).
Example: doy 92 200
Date 1992/07/18 0:00 hrs, DOY 200 JD 2448821.5000 MJD 48821.0000
GPS Week 653 Day of week 6, GPS Seconds 518400 Day of Week Sat
Decimal Year 1992.54372
Example: doy 654W 345600
Date 1992/07/23 0:00 hrs, DOY 205 JD 2448826.5000 MJD 48826.0000
GPS Week 654 Day of week 4, GPS Seconds 345600 Day of Week Thu
Decimal Year 1992.55738
***TODAY*** IS:
Date 2008/10/30 15:19 hrs, DOY 304 JD 2454770.1387 MJD 54769.6387
GPS Week 1503 Day of week 4, GPS Seconds 400786 Day of Week Thu
Decimal Year 2008.829614本文引用地址:http://blog.sciencenet.cn/blog-645611-563123.html 本文引用地址:http://blog.sciencenet.cn/blog-713290-669596.html 此文来自科学网胡洪博客,转载请注明出处。
docker安装gamit_科学网—ubuntu下安装gamit 安装 - 贺小星的博文相关推荐
- docker安装gamit_科学网—Ubuntu系统GAMIT/GLOBK程序安装 - 陈超的博文
最近开始学习GAMIT,网上资料还是蛮多的,但是感觉都是东拼西凑的,一点都不系统,一点不适合初学者.安装教程也是乱七八糟的,下面把我的安装过程分享一下:(我也是参考的网上一个教程,很久以前下载的,地址 ...
- docker安装gamit_科学网—Ubuntu18.04 安装gamit10.7安装 - 陈超的博文
1.安装依赖环境 1.1 gcc g++ gfortran多版本切换(安装gamit需要切换低版本) 1.1.1安装gcc g++ gfortran多版本 sudo apt-get install g ...
- linux中wine文件夹在哪,科学网—Linux下wine的安装和使用以及CAJviewer的安装 - 苗玉虎的博文...
最近突然想使用caj软件看文献,发现linux不支持,so百度一下如何安装,搜到好多,但很多都很乱,遂记下自己的心路历程,以示记载,或许时间久了忘记,留个备份吧,也希望对他人有帮助. 下载好CAJvi ...
- linux子系统安装gromacs,科学网—Windows下GROMACS程序的编译 - 李继存的博文
2015-12-07 22:12:05 总的来说, Windows下的GROMACS程序用于模拟意义不大, 对于长时间的模拟, 我都是放在Linux服务器上进行的. 但将Windows下的GROMAC ...
- java8安装_科学网—Java JDK 8 的安装以及环境变量的配置(Linux and Windows) - 彭勇的博文...
Java JDK 8 的安装以及环境变量的配置(Linux and Windows) JDK(Java Development Kit)包括了Java语言的编译器,可以在这里下载: 根据操作系统选择相 ...
- 断网python第三方库安装_断网环境下利用pip安装Python离线安装包(转载)
这几天搞Windows离线断网环境下安装Python包,配置环境,各种坑!做个记录,供以后查询吧. # 生产环境 windows 7 # python 2.7.9 # pip 1.5.2 友情提示:当 ...
- 断网情况下安装python_断网环境下利用pip安装Python离线安装包
著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处. 这几天搞Windows离线断网环境下安装Python包,配置环境,各种坑!做个记录,供以后查询吧. # 生产环境 windows ...
- r语言做绘制精美pcoa图_科学网—R语言 PCA PCoA ggplot2 - 靳泽星的博文
这一篇是衔接上一篇的,就是要用ggplot2程序包对PCA和PCoA进行可视化.代码我直接照搬过来了,只是绘图的时候用ggplot函数.ggplot2包实现了一个在R中基于全面一致的语法创建图形时的系 ...
- Ubuntu下使用Anaconda安装opencv 解决无法读取视频
Ubuntu下使用Anaconda安装opencv 最近在Ubuntu16.04下使用Anaconda安装opencv,碰到很多坑,记录备忘. cv2.VideoCapture(filename) 返 ...
- Ubuntu安装及Ubuntu下常用软件安装(不断补充)及Windows相关--软件开发用途
之前一直使用Window系统,现在工作中大家主流使用Ubuntu,同事帮忙装个Ubuntu系统,事后写一下安装过程,以备后续再次安装查阅. 1Ubuntu安装 1.1Ubuntu文件下载: Ubunt ...
最新文章
- 微服务架构下分布式事务解决方案——阿里GTS
- Linux内核目录结构(2.6版本以上的kernel)
- Cost Element-成本要素
- 数据源(连接池)的作用
- 十字路口红绿灯plc程序_交通灯程序的最优化(西门子S7-200PLC为例)
- Java—基于Fastjson的JSON串序列化和反序列化模板总结
- 为什么工具监测不出内存泄漏
- A remark on the error-backpropagation learning algorithm for spiking neural networks
- Python使用Manager对象实现不同机器上的进程跨网络传输数据
- three.js mtl材质贴图未显示_C4D材质到底该怎么用?大多数设计师都没搞明白!
- JavaScript 代码片段
- Conda更新或安装包时出现Verifying transaction: failed+SetupToolsRemoveError
- 神仙道玄奇套装材料大全
- java日志(四)--jcl和log4j及log4j2使用
- 四种最常见路由协议 RIP、IGRP、OSPF和EIGRP。
- python交易是什么意思_py交易什么意思
- c语言中的除号什么作用,c语言中除号用什么表示
- 别再问自己适不适合做软件测试了
- RHEL8 新特性和安装方法
- 如何提取谷歌地球的高程点为XYZ文本