Installing GAMIT/GLOBK in Windows 10

In this tutorial, I will write the instruction on how to install GAMIT/GLOBK in Windows 10. For someone who cannot move-on from using window based environment (like me), normally, they will have 2 option to run UNIX-based command; use virtual machine for windows, or install dual boot operating systems.

However, since windows has capability to run UNIX-based command via Windows Subsystem for Linux (Thanks to Windows 10), no need to use such virtual machine or dual booting anymore.

My GAMIT/GLOBK program then will be installed on Ubuntu 16.04.6 LTS (see Figure below)

Here is step-by-step instruction to install GAMIT/GLOBK in windows 10:

Enable your WSL (Windows Subsystem for Linux)

To set your WSL in Windows 10, please follow this intruction.

**it written in Bahasa Indonesia but comes with picture in every step, so I think you can still follow the instruction.

Install prerequisite components

a. tcsh.

Many scripts of GAMIT / GLOBK are written in the C Shell language. To run GAMIT / GLOBK software, this is an essential component. 

b. libx11-dev

c. gfortran

NOTE: Please make sure you’re not installing gfortran-7. This version has a bug so it will cause errors when compiling GAMIT 10.7 in your system and make your GAMIT installation fail. In my case, I used gfortran 5.4.0

d. make

Because Ubuntu subsystem does not come with make. We need this program to execute the makefile that compiles GAMIT / GLOBK.

Install all above prerequisite components via bash terminal on windows 10 by execute following command

>> sudo apt-get install [name-of-component]

If you find any error, don’t forget to execute sudo apt-get update in advance

Please note that GAMIT/GLOBK also need GMT to plot the processing result. Usually if ones execute sh_gamit command, this command required GMT program to plot the processing result. This tutorial didn’t come with how to install GMT program. Please follow this link to install GMT in your WSL.

Copy your GAMIT/GLOBK to /usr/local

To do this step, simply use following command

First, I assume you are at $HOME directory, then type

>> cd /usr/local/

Second, Copy your GAMIT/GLOBK to this directory

>> sudo cp -ar [your-GAMIT/GLOBK-directory] ./

Edit the installation file: install_software

go to your gamit folder and edit install_software file.

>> cd gamit

>> vim install_softaware

I use VIM as text editor in my WSL. To install VIM, you can simply type:

>> sudo apt-get install vim

After install_software is opened, find and edit line that contain following text. Put comment mark (#)

#  set xincpath = `find -H $conf_xincpath -name Xlib.h -print |& sed ‘/^find: /d; s/\/*X11\/Xlib.h//’ | sort -u`

#  set xlibpath = `find -H $conf_xlibpath \( -name libX11.a -o -name -o -name libX11.dylib -o -name -o -name libX11.dll.a \) -print |& sed ‘/^find: /d; s/\/*libX11\..*//’ | sort -u`

and change with following text

set xincpath = /usr/include/X11

set xlibpath = /usr/lib/x86_64-linux-gnu

Execute the installation script

simply type:

>> sudo chmod +x install_software

>> sudo ./install_software

The installation process will began.

HOWEVER, during the installation process, you will find some error. In my case, I have to deal with following error:

To handle this error, go to libraries folder.

>> cd libraries

and edit the Makefile.config file

>> vim Makefile.config

find following text

# X11 library location – uncomment the appropriate one for your system

# Generic (will work on any system if links in place)

X11LIBPATH /usr/lib/X11

X11INCPATH /usr/include/X11

and change with following text

X11LIBPATH /usr/lib/x86_64-linux-gnu

X11INCPATH /usr/include/X11

Additionally, change MAXATM to 25

Go back to gamit directory and execute the installation script

>> cd ..

>> sudo ./install_software

I haven’t got any error since then

Above picture shows the GAMIT/GLOBK installation process is finished, and type “y” to create link.

Final Step: Edit your PATH environment

type following command

>> cd ~

>> vim .bashrc

and put this into the last line of your bashrc

export PATH=$PATH:/usr/local/gamit/gamit/bin

export PATH=$PATH:/usr/local/gamit/kf/bin

export PATH=$PATH:/usr/local/gamit/com

export HELP_DIR=/usr/local/gamit/help/


note: UGM is my current institution, please fill this section with your institution.

Done, GAMIT/GLOBK already installed in your windows 10 environment.

Leave a comment

Your email address will not be published. Required fields are marked *

To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image