歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu 10.10中安裝GAMIT 10.40

Ubuntu 10.10中安裝GAMIT 10.40

日期:2017/2/28 15:45:35   编辑:Linux教程

主要的安裝過程

=======================================

Ubuntu 10.10中

【1】Ubuntu系統的初步配置。

打開終端,具體方式是applications-->accessories-->terminal。

運行 :

sudo apt-get install gfortran

sudo apt-get install build-essential

sudo apt-get install libx11 -dev

sudo apt-get install csh

sudo apt-get install tcsh

sudo apt-get install gmt

【2】安裝GAMIT。

在terminal中

運行:

cd /opt/Gamit 進入/opt/GamitGlobk目錄

chmod +x install_software 執行install_software安裝腳本,給予該文件可執行屬性

./install_software

【3】設置環境變量和命令路徑

在terminal中

運行:

echo $SHELL 查看當前的shell

如果是/bin/bash

在系統的 etc 目錄下,有一個 profile 文件,編輯該文件:

$gedit /etc/profile

在最後邊加入需要設置變量的shell語句

PATH="$PATH:/opt/Gamit/gamit/bin:/opt/Gamit/com:/opt/Gamit/kf/bin"

HELP_DIR=/opt/Gamit/help/

export PATH HELP_DIR該文件編輯保存後,重啟系統,變量生效。

如果想要在csh環境下,則在終端輸入

tcsh

再輸入/bin/csh

重啟,則系統改為csh環境。

接著,在cshrc文件中加入

PATH="$PATH:/opt/Gamit/gamit/bin:/opt/Gamit/com:/opt/Gamit/kf/bin"

HELP_DIR=/opt/Gamit/help/

export PATH HELP_DIR

該文件編輯保存後,重啟系統,變量生效。

【4】驗證

在terminal中

運行:

doy

如果有顯示日期等,安裝基本成功。

=========================================================

遇到的問題

=========================================================

【1】HELP_DIR=/opt/Gamit/help/ 因為對文件夾不熟悉,我寫的是“HELP_DIR=/opt/Gamit/help”,

結果一直遇到錯誤如下

**ERROR** Opening help file.

Check that enviroment variable HELP_DIR points to directory with help files.

IOSTAT error 2 occurred openingdoy.hlp in doy

WARNING:110228:2352:38.0 DOY/doy: IOSTAT error opening file doy.hlp ERROR 2

很久才檢查出這個錯誤。

【2】因為是在虛擬機中安裝的Ubuntu和gamit,所以必須保證有足夠的內存。

因為內存分配不足,之前安裝過兩次,都一直出現錯誤的情況。這樣的問題是第二次了,只要看到Killed字樣,就要考慮系統內存分配問題。

=============================================

一些常用命令行語句

==============================================

source /etc/csh.cshrc 保存修改? 這一句一直出現錯誤提示“syntax error near unexpected token'('” ,不知道為何?

sudo apt-get install rar unrar p7zip %rar文件壓縮解壓縮

參考文獻

http://www.linuxidc.com/Linux/2012-07/65423.htm
http://www.linuxidc.com/Linux/2012-07/65425.htm
http://www.linuxidc.com/Linux/2012-07/65426.htm
http://www.linuxidc.com/Linux/2012-07/65427.htm
http://www.linuxidc.com/Linux/2012-07/65429.htm
http://www.linuxidc.com/Linux/2012-07/65430.htm
http://www.linuxidc.com/Linux/2012-07/65431.htm

Copyright © Linux教程網 All Rights Reserved