Installation of ubuntu16.04 under gmt5.4.1

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.