1.可参考这篇文章https://blog.csdn.net/weixin_43433995/article/details/101526682 但按照这篇文章一路安装下来,最终并不能成功打开class。 2.官方文档http://www.iram.fr/~gildas/dist/gildas.README 3.安装依赖包
Ubuntu 20.04 (or debian-like distributions): Required: sudo apt install gfortran g++ libgtk2.0-dev Recommended: sudo apt install python-is-python3 python3-dev python3-numpy texlive-font-utils Optional: sudo apt install libfftw3-dev libcfitsio-dev Pre-install: export GAG_SEARCH_PATH="/usr/lib:/usr/lib/x86_64-linux-gnu", Install: follow installation steps at paragraph 2
这里的依赖包是20.04,1中文章的依赖包是18.4.下面的过程取自1中文章,
在文件夹主目录中键入: ctrl+h,查看详细文件信息,找到 .bashrc 文件,打开在最后一行加入: export GAG_SEARCH_PATH="/usr/lib:/usr/lib/x86_64-linux-gnu" ,保存并退出。
打开终端进入解压好的gildas目录中: 命令:cd gildas-src-sep19a 查看系统的shell是否为bash,ubuntu系统一般默认为dash, 命令:ls -l /bin/sh 如果显示:/bin/sh->bash 便可以直接进行第5步, 如果显示:/bin/sh->dash ,继续在终端输入命令 sudo dpkg-reconfigure dash 在弹出来的界面中选择no确定即可。
继续在4步中的终端中依次输入命令: source admin/gildas-env.sh source admin/gildas-env.sh -c gfortran source admin/gildas-env.sh -o openmp 意思是让设置在文件中的配置信息马上生效
以上的环境都配置好后,直接 make (此步需要很长时间) make install (此步完成后会提示添加环境变量)
5.
bash users: You should add in your ~/.bash_profile the following lines export GAG_ROOT_DIR=/home/***/astro/gildas/gildas-exe-jun19c export GAG_EXEC_SYSTEM=x86_64-ubuntu18.04-gfortran-openmp source $GAG_ROOT_DIR/etc/bash_profile
csh users: You should add in your ~/.login the following lines setenv GAG_ROOT_DIR /home/***/astro/gildas/gildas-exe-jun19c setenv GAG_EXEC_SYSTEM x86_64-ubuntu18.04-gfortran-openmp source $GAG_ROOT_DIR/etc/login
You should then exit this xterm and open a new one to reset your path. GILDAS should be ready for use (e.g. type greg @ gag_demo:demo). Bye. *************************************************************************** 重起后生效 或者 source ~/.bash_profile 也可以生效
以上是添加环境变量的过程,~/.bash_profile和~/.login需要自己在主目录中创建。GAG_ROOT_DIR的后面是你的gildas安装地址,GAG_EXEC_SYSTEM=也要改为你的ubuntu版本。
6.在 ~/.bashrc最后添加
#Source bash_profile to set JAVA_HOME and add it to the PATH because for some reason is not being picked up . ~/.bash_profile
|