How to properly install GMT on Linux (Ubuntu 16.04)

Added by Ron about 1 month ago

Hi friends,

I am trying to install GMT on my Ubuntu based computer. I've never installed GMT before.

I tried the command found at this link: http://gmt.soest.hawaii.edu/?id=Installing

And I have clearly installed something onto my system, as if I type in "gmt" I get the standard dialogue.

However, when I try to run a gmt program it forces me to put "gmt" in front of every command (it does not make me do this at the schools computers).
Additionally, when I try to run my program, it seems to go through it but does not output anything. Instead, it outputs a blank canvas and sends me back this:

xyz2grd: Warning: Option -F is deprecated. Use -r instead.
Please see http://gmt.soest.hawaii.edu/doc/5.2.1/GMT_Docs.html#new-features-in-gmt-5 for more information.
xyz2grd: Warning: Option -H is deprecated. Use -h instead.
Please see http://gmt.soest.hawaii.edu/doc/5.2.1/GMT_Docs.html#new-features-in-gmt-5 for more information.
xyz2grd: Error for input file: No such file (MarsG1.txt)
grdimage: Error for input file: No such file (MarsG1.grd)
grdimage: Syntax error: Must specify one (or three) input file(s)
./MarsMaps2.gmt: line 3: $'\r': command not found
psscale: Warning: The -E option is deprecated but is accepted.
psscale: For the current -D syntax you should use -D modifier +e instead.
psscale: Note you cannot mix new-style modifiers (+e) with the old-style -D option.
psscale: Processing input CPT table
psscale: CPT range from -400 to 400
PSL: Too many colors to make colormap - using 24-bit direct color instead.
PSL: DEFLATE compressed 8280 to 1987 bytes (76.0% savings at compression level 5)
./MarsMaps2.gmt: line 5: $'\r': command not found
xyz2grd: Warning: Option -F is deprecated. Use -r instead.
Please see http://gmt.soest.hawaii.edu/doc/5.2.1/GMT_Docs.html#new-features-in-gmt-5 for more information.
xyz2grd: Warning: Option -H is deprecated. Use -h instead.
Please see http://gmt.soest.hawaii.edu/doc/5.2.1/GMT_Docs.html#new-features-in-gmt-5 for more information.
xyz2grd: Processing input table data
xyz2grd: nx = 360 ny = 180 nm = 64800 size = 64800
xyz2grd: Data records read: 1036800 used: 1036800 nodes filled: 64800 nodes empty: 0 [set to 0]
xyz2grd: Warning - 64800 nodes had multiple entries that were processed
xyz2grd: Extend grid via copy onto larger memory-aligned grid
grdimage: Allocates memory and read data file
grdimage: Warning: Central meridian set with -J (0) implies -R-180/180/-90/90
grdimage: project grid files
grdimage: GMT_grd_project: Output grid extrema [-94194.5/170388] exceed extrema of input grid [-7487.44/20474.8]
grdimage: Error: Cannot open color palette table /usr/share/gmt/cpt/Topo.cpt
[Session gmt (0)]: Error returned from GMT API: GMT_CPT_READ_ERROR (8)
[Session gmt (0)]: Error returned from GMT API: GMT_CPT_READ_ERROR (8)
[Session gmt (0)]: Error returned from GMT API: GMT_CPT_READ_ERROR (8)
./MarsMaps2.gmt: line 8: $'\r': command not found
psscale: Warning: The -E option is deprecated but is accepted.
psscale: For the current -D syntax you should use -D modifier +e instead.
psscale: Note you cannot mix new-style modifiers (+e) with the old-style -D option.
psscale: Processing input CPT table
psscale: Error: Cannot open color palette table /usr/share/gmt/cpt/Topo.cpt
[Session gmt (0)]: Error returned from GMT API: GMT_CPT_READ_ERROR (8)
[Session gmt (0)]: Error returned from GMT API: GMT_CPT_READ_ERROR (8)
[Session gmt (0)]: Error returned from GMT API: GMT_CPT_READ_ERROR (8)
./MarsMaps2.gmt: line 10: $'\r': command not found
xyz2grd: Warning: Option -F is deprecated. Use -r instead.
Please see http://gmt.soest.hawaii.edu/doc/5.2.1/GMT_Docs.html#new-features-in-gmt-5 for more information.
xyz2grd: Warning: Option -H is deprecated. Use -h instead.
Please see http://gmt.soest.hawaii.edu/doc/5.2.1/GMT_Docs.html#new-features-in-gmt-5 for more information.
xyz2grd: Error for input file: No such file (MarsGLplus1.txt)
grdimage: Error for input file: No such file (MarsGLplus1.grd)
grdimage: Syntax error: Must specify one (or three) input file(s)
./MarsMaps2.gmt: line 13: $'\r': command not found
psscale: Warning: The -E option is deprecated but is accepted.
psscale: For the current -D syntax you should use -D modifier +e instead.
psscale: Note you cannot mix new-style modifiers (+e) with the old-style -D option.
psscale: Processing input CPT table
psscale: CPT range from -400 to 400
PSL: Too many colors to make colormap - using 24-bit direct color instead.
PSL: DEFLATE compressed 8280 to 1987 bytes (76.0% savings at compression level 5)

I'm a bit lost now, but I'm going to try to work it out based on this information. If anyone has any suggestions please let me know.

Thank you all,
Ron


Replies (3)

RE: How to properly install GMT on Linux (Ubuntu 16.04) - Added by Ron about 1 month ago

Update: It appears I didn't read the error logs as well as I should have.

I THINK everything is installed and working fine.

Thank you.

RE: How to properly install GMT on Linux (Ubuntu 16.04) - Added by On Your about 1 month ago

Install all the dependencies and download GMT in a folder called gmt5-dev

cd /home/your_user_folder

sudo apt-get install ghostscript build-essential cmake libnetcdf-dev libgdal1-dev libfftw3-dev libpcre3-dev subversion

svn checkout svn://gmtserver.soest.hawaii.edu/gmt5/trunk gmt5-dev

I love to ride folding bikes - https://www.onyourbike.com/folding-bikes.php

RE: How to properly install GMT on Linux (Ubuntu 16.04) - Added by Ron about 1 month ago

Thanks for the help. I can say that everything is working properly now.

(1-3/3)