2008年10月22日,Gamit 10.34版发布了最新的修改补丁。
修改后,新版本包含如下目录及文件:/incremental_updatescom.10.34.tar.Zetopo5.grd.10.0.tarexample.10.34.tar.Zgamit.10.34.tar.Zhelp.10.34.tar.Zincremental_updates.081022.tar.Zkf.10.34.tar.Zlibraries.10.34.tar.Zmaps.10.1.tar.Ztables.10.34.tar.Zinstall_softwareinstall_updatesrelnote.10.21relnote.10.34下载后立即安装软件于ubuntu8.04 linux桌面操作系统。
安装比较简单,只需要输入几个命令,并修改一个参数即可。
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库支持。
至此,准备工作完成,开始正是安装Gamit10.34。
安装文件大部分为.tar.Z格式压缩文件,但是你不需要解压缩这些文件,因为安装程序install_software会自动为你完成这一步骤。
首先,在/opt目录下建立gamit10.34目录作为软件的安装目录,因为/opt目录一般用来存放软件。
当然,你也可以选择其他目录。
将下载的文件全部复制到/opt/gamit10.34/目录下。
打开终端,输入cd /opt/gamit10.34进入安装目录,输入./install_software安装程序install_software启动,搜索安装目录/opt/gamit10.34下的全部压缩文件,提示GAMIT and GLOBK to be installed into /opt/gamit10.34If you need help with command line options type CTL_C now and typeinstall_software -help on the command lineThe compressed tarfiles will be removed after extraction of thedirectories, but except for that, the script may be stopped andrerun 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.ZContinue ? (y/n)输入字母“y”,开始解压缩安装文件,.. uncompressing and extracting the directories:Do you want to apply incremental updates: incremental_updates.080812.tar.Zincremental_updates.080919.tar.Z incremental_updates.081022.tar.ZContinue ? (y/n)输入字母“y”,开始解压缩安装文件,.. applying incremental updates:.. adding /opt/gamit10.34/com to your search path to continue installationTo execute GAMIT and GLOBK you will need to set your login path toinclude /opt/gamit10.34/com /opt/gamit10.34/gamit/bin /opt/gamit10.34/kf/binYou will also need the alias or link gg --> /opt/gamit10.34Your Operating System type is: LinuxYour default awk version is: /usr/bin/awkThese are the default paths to X11 found in Makefile.configX11LIBPATH: /usr/lib/X11X11INCPATH: /usr/include/X11Searching your system for X11 installationFound these paths to X11 libs and includes on your systemX11LIBPATH: /usr/libX11INCPATH: /usr/include/X11Are these correct for your system?Continue? (y/n)此时先不要继续安装,进入/opt/gamit10.34/libraries/目录,修改Makefile.config中的一组参数,原文中的MAXSIT 55MAXSAT 32MAXATM 13MAXEPC 2880将MAXATM改为25。
回到终端,输入字母“y”,提示GAMIT dimensions in /libraries/Makefile.config are set tomaxsit = 55maxepc = 2880maxatm = 25maxsat = 32Are these defaults found in Makefile.config correct?If NOT edit the Makefile.config now before choosing to contineContinue ? (y/n)输入字母“y”,开始安装。
安装最后会提示++++++++++++++++++GLOBK installed++++++++++++++++++Create the gg link in your home directory to the version ofgamit/globk you just installed ? (y/n)输入字母“y”,回车,显示Making required ~/gg link to newly installed softwareln -s -f /opt/gamit10.34 ~/ggDon'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 promptset prompt = "[`echo $cwd`]% "set history = 50set gamitpath = /opt/gamit10.34set 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/bin $gamitpath/kf/bin $gamitpath/com $path)setenv HELP_DIR $gamitpath/help/setenv PATH "/usr/sbin:/sbin:${PATH}"setenv MANPATH /usr/local/gmt/man:/usr/local/man:/usr/X11R6/mansetenv LIBPATH /usr/local/gmt/lib:/usr/lib:/usr/local/lib:/usr/i386-glibc21-linux/lib#set gcclib directionsetenv LD_LIBRARY_PATH /usr/local/gcc-3.4.1/lib/# set aliasalias 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,全部安装完成。