1 references to God blog http://seisman.info/install-gmt5.2.x-under-linux.html
Https://github.com/gmt-china/gmt-easy-installer/blob/master/GMT-installer.sh Download GMT Automated Installation
2 myself Download the latest version of Gmt-5.4.1-src.tar.gz gshhg-gmt-2.3.6.tar.gz and dcw-gmt-1.1.2.tar.gz from ftp://ftp.soest.hawaii.edu/gmt/
3 Installing dependent Packages
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-devsudo apt-get install libglib2.0-dev# 推荐安装的包sudo apt-get install libgdal-dev python-gdalsudo apt-get install liblapack3# 可选的安装包sudo apt-get install libpcre3-dev libfftw3-dev
4 Directly run 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}
Running here, it's been a mistake.
5 in the terminal terminal
# Switch to GMT source directory$CD gmt-5.4.1# Create a new user profile$ sudo gedit cmake/configuser.cmake set (cmake_install_prefix "${gmt_install}")
Set (Gmt_install_module_links FALSE)
Set (COPY_GSHHG TRUE)
Set (COPY_DCW TRUE)
Set (Gmt_use_threads TRUE)
6 mkdir Build
CD Build
CMake.
Make
sudo make install
Cd.. /..
7 finally configure environment variables in the terminal 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 Test If the GMT installation is successful
Terminal Direct input GMT or GMT--version
or GMT Psxy or GMT Pslegend
Success.
9 GMT Chinese Support
Finish tomorrow.
Installation of ubuntu16.04 under gmt5.4.1