
为何我每次重开终端都要重新输入 "source /opt/intel/Compiler/11.1/046/bin/ifortvars.sh ia32" and "export INTEL_LICENCE_PATH=/opt/intel/licenses/licenses" 否则就会出现找不到"ifort" 命令的错误
The Installation Guide(http://www.intel.com/software/products/ ... NSTALL.htm)
说 "The compiler installation program creates compiler environment script files (ifortvars.sh/idbvars.sh) that set these variables. It is strongly recommended that you add those script files into your login script (.login file). Once the variables are set in the ".login" file there is no need to run the script files for each session..."
我找到csh.login( not .login) in the /etc/... directory,然后打开:
# /etc/csh.login
# System wide environment and startup programs, for login setup
if ($?PATH) then
if ( "${path}" !~ */usr/X11R6/bin* ) then
setenv PATH "${PATH}:/usr/X11R6/bin"
endif
else
if ( $uid == 0 ) then
setenv PATH "/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin"
else
setenv PATH "/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/X11R6/bin"
endif
endif
setenv HOSTNAME `/bin/hostname`
set history=1000
if ( -d /etc/profile.d ) then
set nonomatch
foreach i ( /etc/profile.d/*.csh )
if ( -r $i ) then
if ($?prompt) then
source $i
else
source $i >& /dev/null
endif
endif
end
unset i nonomatch
endif
The question is : 我怎么样才能修改login文件使得不用每次开机都得重新设置license的路径?(I don't know how to add those compiler environment script files (ifortvars.sh/idbvars.sh)into the login script?
Best regards, a novice limh