Troubleshooting the installation of IRAF on Ubuntu

So, found myself installing IRAF on a friend’s laptop running Ubuntu. There are some decent tutorials online about the general steps: for example, this one, and the official one. However, they all skip all possible issues that could come up (or at least, that popped up in my case). This is another good resource about the setup, config and usage (but skip the Ureka parts).

The community-maintained version of IRAF allows easy installation on some systems, such as Ubuntu.

The thing is that IRAF is a jumble of stunningly old pieces of software working together on primitive terminals and on peculiar conditions.

In random order, possible issues/tips are:

  • If the packages iraf-all pyraf-all stsci show as non-existent, you have not added the astroconda channel. The command should be
    conda config --add channels
  • You will still need to manually install ds9:
    sudo apt install saods9
  • You do not need to change the default shell to tcsh, although you need it to be installed:
    sudo apt install tcsh
  • If xgterm does not execute with error File not found, although the file is clearly there, make sure you have installed 32 bit dependencies:
    sudo apt-get install libc6:i386 libz1:i386 libncurses5:i386 libbz2-1.0:i386 libuuid1:i386 libxcb1:i386 libxmu6:i386
  • If conda commands do not work, make sure you have activated the Python environment containing the iraf packages:
    cd /path/to/iraf
    source activate iraf27

In the end, the exact set of commands that got the whole environment working has been:

xgterm -sb &
ds9 &
cd /path/to/iraf
source activate iraf27


Then you are into the iraf environment. However, you may use ds9 only to manipulate images: in some cases it may be just enough!

  • Was this Helpful ?
  • yes   no

5 thoughts on “Troubleshooting the installation of IRAF on Ubuntu

  1. Greetings, I’m using Ubuntu 18.04. Recently updated from 14.04 –> 16-04, and now I’m trying to open a “xgterm” but I get this msg
    Command ‘xgterm’ not found, did you mean:

    command ‘xterm’ from deb xterm

    Try: sudo apt install

    I did install IRAF and pyRAF, and also DS9. Then I did install all the packages

    “sudo apt-get install libc6:i386 libz1:i386 libncurses5:i386 libbz2-1.0:i386 libuuid1:i386 libxcb1:i386 libxmu6:i386”, although I’ve them already installed, so it showed “manually installed”.

    So, my question is … how do I get the Xgterm installed?

    Thanks in advance.


    PS: Sorry my lousy english, I’m from argentina.

  2. Thank you, especially for the tip that to get xgterm to work, it is necessary to install the 32 bit dependencies! That did the trick, finally, but I spent a good while puzzling over why the xgterm that I had copied from my old 64-bit ubuntu (14.02 LTS) laptop to the newer one (18.04 LTS) would not work. I would not know how to use IRAF effectively without launching it from an xgterm, and the iraf included in the ubuntu distirbution did not – at least as far as I could tell – include xgterm (clicking the IRAF icon launches an xterm).

  3. Since Ubuntu 18.04, IRAF is also included directly in the distribution, so you may just install it as any other package with “apt install iraf”. A few addons (fitsutil, rvsao, wcstools, mscread, sptable) are available as well.
    Please note that IRAF is not supported anymore by NOAO or STScI. There is the IRAF community that tries to keep IRAF available (which is also the base for the Ubuntu/Debian package of IRAF).
    Best regards,
    Ole (Debian/Ubuntu maintainer of IRAF)

Leave a Reply

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