IRAF (V2.16.1+ snapshot) installation on macOS Mojave (10.14.6)

I have been looking for time to make a smooth and clean IRAF installation. That’s when it came, and I wanted to note here how I installed the latest version of IRAF (NOAO/IRAF community V2.16.1+ snapshot) from GitHub on my computer. I hope it will help someone.

In fact, everything is explained in detail here, and I took advantage of it.

The usual way is to install IRAF under the root directory “/iraf/iraf“, but I didn’t do that. So I didn’t need system administrator rights for installation. I installed directly under my $HOME directory.

XQuartz and ds9 must be installed on your system. You can find them on their website: download and install.

In the Mojave version of macOS, ds9 may fail. Therefore, I recommend that you use version 8.1b2 until this error is corrected (please see and check the last announcements: https://twitter.com/SAOImageDS9/status/1161031804695896064).

First, let’s go to the $HOME directory and clone the latest version/commit of IRAF from GitHub. Then let’s rename the folder as “iraf_root” (of course this is my choice).

$ cd
$ git clone https://github.com/iraf-community/iraf.git
$ mv iraf iraf_root
$ cd iraf_root
$ chmod +x install
$ ./install

Press “enter” at each step to complete the installation and then define the directory where our binary files will be stored.

Now you can configure the system for the proper architecture and build:

$ make macintel
$ make sysgen 2>&1 | tee build.log

This part will take longer. Please wait patiently. Then, you can check whether a successful installation has been performed with the command below.

$ ./test/run_tests

Now we need to install x11iraf. Without this we won’t be able to run xgterm.

$ cd ~/iraf_root/vendor/
$ mkdir x11iraf
$ cd x11iraf
$ wget https://159.226.170.25/mirror/AstroSoft/IRAF/x11iraf/x11iraf-v2.0BETA-bin.macintel.tar.gz
$ tar -xvf x11iraf-v2.0BETA-bin.macintel.tar.gz
$ rm -rf x11iraf-v2.0BETA-bin.macintel.tar.gz
$ sudo nano /etc/paths

The latest command is to define x11iraf binary to the system terminal environments. In the editing section that opens, add the following line to the bottom.

/Users/USERNAME/iraf_root/vendor/x11iraf/bin.macintel

Hit control-x to quit. Enter “Y” to save the modified buffer. To test it, in a new terminal window, type:

$ echo $PATH

For more detailed explanation please visit here.

And it’s over!

After that, you can create a directory if you want to work comfortably.

$ cd
$ mkdir iraf_playground
$ cd iraf_playground
$ mkiraf
$ xgterm &

IRAF is now ready to run in the xgterm window!

$ ecl

Open ds9 and try the following commands to test.

$ ecl> display dev$pix 1

After this, you should use iraf without problems. If you have issues, please write/comment to me or directly to https://github.com/iraf-community/iraf/issues.