歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Linux 下運行GAMIT的問題及解決

Linux 下運行GAMIT的問題及解決

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

我把已經編譯過的GAMIT軟件烤到/home/gamit/目錄下

修改root目錄下文件.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startupprograms
PATH=$PATH:$HOME/bin:/home/gamit/com:/home/gamit/bin
HELP_DIR=/home/gamit/help
export PATH HELP_DIR
unset USERNAME
這裡有疑問PATH是系統環境變量,,HELP_DIR也是系統環境變量嗎,還是用戶自定義的?

第二個問題
[root@localhost ~]# $PATH
bash:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/home/gamit/com:/home/gamit/bin: 沒有那個文件或目錄
[root@localhost ~]# $HELP_DIR
bash: /home/gamit/help: is a directory
“沒有那個文件或目錄”說明什麼問題

第三個問題是運行命令,並沒有打開幫助目錄,為什麼?

**ERROR** Opening help file. Check that enviroment variable HELP_DIR points to directory with help files.
IOSTAT error 2 occurred opening
/home/gamit/helpgapr_to_l.hlp
in gapr_to_l/globk apriori
WARNING:080725:2156:16.0 GAPR_TO_L/gapr_to_l/globk apriori: IOSTAT error opening file /home/gamit/helpgapr_to_l.hlp ERROR 2
PROGRAM gapr_to_l/globk apriori terminating
STOP Incomplete runstring statement executed
拜托熟悉Linux或gamit軟件的給看一下。

問題補充:

gamit是GPS數據處理軟件,/home/gamit/help是命令的幫助文件目錄

一些解決方法:

1、所有的環境變量都是為了被程序使用的,如果你的環境變量不被使用,那麼他就是多余的。PATH 變量會被 bash 使用(也就是當前的命令行解釋程序),所以他就不是多余的。你的 HELP_DIR 也會被後面的 gamit 使用,所以他也不是多余的。
系統環境變量和用戶自定義的環境變量的區別就是他是不是被系統級別的程序使用。對於用戶來說沒有必要分的這麼細,只要這個變量有用,那麼就應該設置他。

2、PATH 變量是用來保存特殊數據的,不是用來運行的。

3、HELP_DIR 設為 /home/gamit/ 試試。或者干脆不設置試試。

PS:gamit 是啥?
----------------
IOSTAT error 2 occurred opening
/home/gamit/helpgapr_to_l.hlp
in gapr_to_l/globk apriori

WARNING:080725:2156:16.0 GAPR_TO_L/gapr_to_l/globk apriori: IOSTAT error opening file /home/gamit/helpgapr_to_l.hlp ERROR 2

貌似 help 相關的文件不在 help 子目錄下面。

GAMIT使用指南 見 http://www.linuxidc.com/gamit/

Copyright © Linux教程網 All Rights Reserved