Installation of GMT and GMTSAR with Homebrew

1) Download and install orbit files in /usr/local/orbits:

http://topex.ucsd.edu/gmtsar/tar/ORBITS.tar
sudo -i
cd /usr/local
mkdir orbits
cd orbits
tar -xvf ~/Downloads/ORBITS.tar # (need full path to ORBITS.tar)

2) Install stable version 5.4 with Homebrew

xcode-select --install
brew tap ecreinisch/homebrew-insar
brew install gmtsar  

Installation of GMT and GMTSAR with other package managers

1) Install GMT (5.2.1 or later) first with all optional libraries (GDAL and PCRE, plus FFTW3 and LAPACK for Linux).
  • Linux: Depending on your OS version a GMT package may exist (see below). if not, see Building Instructions
  • OS X (Macports):
  • sudo port install gdal +curl +geos +hdf5 +netcdf +tiff
    sudo port install gmt5
    sudo port install autoconf
    
  • OS X (Fink):
  • sudo fink install libtiff5
    sudo fink install gmt5
    
2) Install extra libraries. Note that depending on your OS version the actual version numbers in some of the packages below may differ):
  • Ubuntu 14.04 LTS:
  • sudo apt-get install csh subversion autoconf libtiff5-dev libhdf5-dev
    sudo apt-get install liblapack-dev
    sudo apt-get install gfortran
    sudo apt-get install g++
    Install GMT from source since no GMT version >= 5 in 14.04.
    
  • Ubuntu 16.06 LTS:
  • sudo apt-get install csh subversion autoconf libtiff5-dev libhdf5-dev
    sudo apt-get install liblapack-dev
    sudo apt-get install gfortran
    sudo apt-get install g++
    sudo apt-get install libgmt-dev
    sudo apt-get install gmt
    
  • CentOS 7:
  • sudo yum install svn autoconf gcc-c++ libtiff-devel libhdf5-devel
    sudo yum install gmt
    
  • Fedora 23:
  • sudo yum install csh subversion autoconf  gcc-c++libtiff-devel hdf5-devel
    (need fftw-developer for faster execution.)
    sudo yum install gmt
    

3) Download and install orbit files and place in suitable directory (e.g., /usr/local/orbits):

http://topex.ucsd.edu/gmtsar/tar/ORBITS.tar
sudo -i
cd /usr/local
mkdir orbits
cd orbits
tar -xvf ~/Downloads/ORBITS.tar # (need full path to ORBITS.tar)

4) Download GMTSAR branch 5.4 via subversion in a suitable directory:

sudo -i
cd /usr/local
svn checkout svn://gmtserver.soest.hawaii.edu/GMTSAR/branches/5.4 GMTSAR

5) Make and install GMTSAR (change the orbits directory if different):

cd GMTSAR
autoconf
./configure --with-orbits-dir=/usr/local/orbits
make
make install


6) Add the executables to your path (for csh or tcsh):
cd ~
#
#   edit your .tcshrc file and add the following lines
#
        setenv GMTSAR /usr/local/GMTSAR
        setenv PATH $GMTSAR/bin:"$PATH" 

or
cd ~
#  edit your .bashrc file and add the following lines
        export GMTSAR=/usr/local/GMTSAR
        export PATH=$GMTSAR/bin:"$PATH"