Installing GMT v4.2.0 on OS X 10.4.x

These is a new and hopefully simpler guide to installing GMT (Generic Mapping Tools) on a mac. For the old instructions look here.

Before you start

To check whether you have a particular command available type "which <command>" in the terminal window. It should return the path to the binary (executable). In some cases you may need to make a note of this path.

Optional but recommended

Make sure $MATLAB and $NETCDFHOME are set in your .cshrc file (or equivalent). To test, type "echo $MATLAB" in a fresh terminal window, if the correct path is returned, then it is set. Do the same for $NETCDFHOME. To set these in your .cshrc type
setenv MATLAB /Applications/MATLAB74 setenv NETCDFHOME /Applications/netcdf-3.6.1
with your correct paths instead. Then "source ~/.cshrc" and you should find these paths are set.

I said optional because having these set means your system knows where to point for matlab of netcdf files and you don't then need to set these paths in the install form below. I prefer it this way, but you can just skip on ahead if you wish.

GMT download and install settings

Go to the GMT download page and read the instructions! You want the fast-track section, and go to the "install form". First if all, under Basic Requirements, do you see the link to "install_gmt"? Save this file in your GMTdev directory. Make sure you have execute permissions set for this script (chmod u+x install_gmt).

These were my selections for each option in the form. Follow along and make changes if you wish.

Section A

1) Version 4.2.0
2) bzip2 (smaller than gzip).
3) SI, but change if you must.
4) EPS. Should fit tight bounding boxes to your figures.
5) Yes.

Section B

1) Depends on your system, remember you checked this earlier. If you use "which ncdump" to get the path then remember to remove the "/bin" from the end of the path. For example your netcdf path might be "/Applications/netcdf-3.6.1".

Section C

1) Use Hawaii. Sometimes the mirrors are not synched properly, although if this is slow then choose another.
2) Normal.
3) I chose everything.
3) (again) Shewchuck, unless you have reason not to.
4) Static.
5) gcc. You should have checked its availability earlier.
6) Use the default make, unless your system requires otherwise. Again, you checked its availability earlier.
7) Leave blank as I like the defaults. If you want to put files in a specific place then specify the paths here.
8) Leave blank.
9) Leave on default.
10) I selected everything except XGRID. The ones you are likely to want for seismic survey analysis are IMG2SRC, MEX (need matlab), MDG77, MISC, SEGYPROGS, X2SYS and X_SYSTEM.

Specify your matlab path here if $MATLAB is not set and you want to install the MEX packages.
11) I delete the archives and run the examples.

Click "Get Parameters" and save the screen as a text file. In Firefox this is done by File --> Save Frame As.

Install GMT

In the terminal window go to your GMTdev directory where you should now have two file: the parameters file you just saved and "install_gmt". To install type:
sh ./install_gmt <parameter file name>
and watch the screen for errors. All the necessary files will be downloaded first.

See the instructions at the end of the install log on the screen? They tell you to add some paths to your .cshrc. Do it. This tells your computer where to look for the programs and manual pages (you can skip the webpage bookmark if you like).

Known Problems




Home - About me - Photos - Wedding - Seismic oceanography - Research - Links - Running - Scuba

Andrew Bullock Last modified 05th April 2007