标签:环境 line 依赖包 hosts com glib pack dal ash
1 参考具神博客http://seisman.info/install-gmt5.2.x-under-linux.html
https://github.com/gmt-china/gmt-easy-installer/blob/master/GMT-installer.sh 下载gmt自动化安装
2 我自己从ftp://ftp.soest.hawaii.edu/gmt/下载最新版本的gmt-5.4.1-src.tar.gz gshhg-gmt-2.3.6.tar.gz 和dcw-gmt-1.1.2.tar.gz
3 安装依赖包
sudo apt-get update
sudo apt-get install netcdf-bin libnetcdf-dev
sudo apt-get install libgdal-dev
sudo apt-get install libpcre3 libpcre3-dev
sudo apt-get update
# 必须安装的包
sudo apt-get install ghostscript libnetcdf-dev
sudo apt-get install libglib2.0-dev
# 推荐安装的包
sudo apt-get install libgdal-dev python-gdal
sudo apt-get install liblapack3
# 可选的安装包
sudo apt-get install libpcre3-dev libfftw3-dev
4 直接运行 sh gmt-installer.sh
tar -xf gmt-${GMT_VERSION}-src.tar.gz
tar -xf gshhg-gmt-${GSHHG_VERSION}.tar.gz
tar -xf dcw-gmt-${DCW_VERSION}.tar.gz
mv gshhg-gmt-${GSHHG_VERSION} gmt-${GMT_VERSION}/share/gshhg
mv dcw-gmt-${DCW_VERSION} gmt-${GMT_VERSION}/share/dcw-gmt
cd gmt-${GMT_VERSION}
运行到这里,一直出错
5 在terminal终端中
6 mkdir build
cd build
cmake ..
make
sudo make install
cd ../..
7 最后在terminal终端中配置环境变量
# Configuration
echo "export GMT5HOME=${GMT_INSTALL}" >> ~/.bashrc
echo ‘export PATH=${GMT5HOME}/bin:$PATH‘ >> ~/.bashrc
echo ‘export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GMT5HOME}/lib64‘ >> ~/.bashrc
8 测试gmt安装是否成功
terminal 直接输入gmt或者gmt --version
或者gmt psxy or gmt pslegend
成功。
9 gmt中文支持
明天完成
标签:环境 line 依赖包 hosts com glib pack dal ash
原文地址:http://www.cnblogs.com/gisalameda/p/6837166.html