Installing IRAF on Fedora 8

Standard

It took me quite some time to install IRAF (V2.14) on my laptop, mainly because of some errors I got on the way. Below I will try to explain the installation steps, in case someone ever gets stuck in similar problems.

1. Creating the IRAF user account

If you’re not an expert in Linux, the easiest way to create a new user is by going to

K Menu > Administration > Users and Groups

If you are logged in as a normal user, it will ask you to introduce the root password. Go ahead with this, and then click on Add User. A new window will appear. For User Name write iraf, for Full Name you can write anything, choose a password for the new account, for the Login Shell choose /bin/csh or /bin/tcsh (I use csh), set the Home Directory to /home/iraf/local, and leave all other options set to their default values.

These steps should create a new directory in the folder /home/, at least that’s what I supposed. For me it didn’t work like that, so I created the directory manually, with

$ su –

$ mkdir /home/iraf

$ mkdir /home/iraf/local

and then I copied the folders (Desktop, Documents, etc.) from my other account (/home/georgiana) in the iraf home directory with

$ cp -f /home/georgiana/* /home/iraf/local

Now you should fix the owners/permission issues. You can do this with

$ chown -R iraf /home/iraf

$ chgrp -R iraf /home/iraf

$ chmod 777 /home/iraf

After you do all this, log into your IRAF account.

2. Creating the directory tree

I will just write below the directory tree I have. You should be able to create the (empty) directories using the command mkdir (you don’t have to log in as root to do this; if you do, then it means you have some problems with the permissions to the folder /home/iraf/).

$ /home/iraf

$ /home/iraf/local

$ /home/irafbin

$ /home/irafbin/bin.redhat

$ /home/irafbin/noao.bin.redhat

$ /home/extern

$ /home/extern/mscred

$ /home/extern/stsdas

$ /home/x11iraf

3. Downloading and unpacking the installation packages

You can do this via FTP from the terminal, but the easiest way to do it if you’re not to much into Linux is to go on the IRAF website – http://iraf.noao.edu/. The RedHat/Fedora packages you need are AS, IB, and NB. Save the AS package to /home/iraf, the IB package to /home/irafbin/bin.redhat, and the NB package to /home/irafbin/noao.bin.redhat.

From the terminal, unpack the AS package with

$ cd /home/iraf

$ cat as.pcix.gen.gz | zcat | tar -xpf –

the IB package with

$ cd /home/irafbin/bin.redhat

$ cat ib.rhux.x86.gz | zcat | tar -xpf –

and the NB package with

$ cd /home/irafbin/noao.bin.redhat

$ cat nb.rhux.x86.gz | zcat | tar -xpf –

4. Run a trial installation (don’t skip this, it’s useful :p)

You do this with

$ setenv iraf /home/iraf/

$ cd /home/iraf/unix/hlib

$ source irafuser.csh

$ ./install -n

Set the directories you are asked for to

New iraf root directory (/home): /home/iraf

Default root image storage directory (/home/iraf/imdirs): /home/iraf/imdirs

Local unix commands directory (/usr/local/bin): /usr/local/bin

I didn’t get any errors in this part, so if you do have problems, I would suggest you read through the installation manual (they give some common mistakes, errors, etc. there). Try to fix any warnins or errors before proceeding with the actual installation.

If everything is OK (or if you only get warnings, and not errors) you will be asked proceed with the installation. You can choose ‘no’ for the moment.

5. Install IRAF

Log in as superuser (root) with

$ su –

Now repeat the same steps as above, but do not write the -n in the ./install command:

$ setenv iraf /home/iraf/

$ cd /home/iraf/unix/hlib

$ source irafuser.csh

$ ./install

Choose the same directories as above, and when asked if you want to proceed with the installation say ‘yes’. You will be prompted with whether to continue with the post-install configuration; choose ‘yes’.

6. Post-install configuration

I managed to use all the IRAF commands I tried until now with the configuration I will write below. However, in case something does not work, it might be useful to consult the Unix IRAF Site Manager’s Guide (you can find it on the IRAF website).

Configure IRAF Networking on this machine? (yes): n

Create a default tapecap file? (yes): y

Do you wish to create a default dev$tapecap link? (yes): y

Do you wish to delete these unused HSI binaries? (yes): n

Do you wish to strip the system of sources? (no): y

Log out of root by typing logout in the terminal.

Until this point, everything ran smoothly for me. However, I had problems using mkiraf and cl. You can see below what I did to solve them.

7. MKIRAF

When I first tried using the command mkiraf, I got an error saying that the command was not found. If you did all the steps as above, you can fix this by typing

$ /usr/local/bin/mkiraf

instead of

$ mkiraf

Somehow, the command is not found automatically, so you have to specify the full path to it. Be careful, because you have to do this from a folder in which you want your IRAF stuff to be, not from one of the folders in which you have just installed the IRAF components.

8. CL

Then, by simply typing cl you again get

cl: Command not found

so instead you should specify the full path, which is

/usr/local/bin/cl

I thought this will work nicely, but I got another error saying

/iraf/iraf/bin.redhat/ecl.e: error while loading shared libraries: libtermcap.so.2: cannot open shared object file: No such file or directory.

I googled a bit about this error, but all I got were some websites written in Japanese (I think). In the end, I figured it out that all I had to do is to install two missing packages in Fedora: libtermcap and libtermcap-devel. You can do this by going to

System > Add/Remove Software > [enter root password] > Search

and in the search field type libtermcap and click Search. Two packages are found (the ones mentioned above); select both of them and install them.

Now you can go back to the terminal, and in the folder where you want your IRAF files to be (again, not the ones created during installation) type cl.

With a bit of luck, this should do the trick and you can start using IRAF. Just as a note, only the installation has to be done in the IRAF account. You can use IRAF on all your other Linux accounts.

42 responses »

  1. I’ve also had the same problem with one extra little detail: there was no /bin/csh in the system. So I had to do just as I did for libtermcap and install the tcsh package.

  2. When I try mkiraf it gives me:

    [iraf@phobos ~]$ /usr/local/bin/mkiraf
    Error: current directory is not an iraf user login directory

    ?

  3. You are trying the command from an IRAF system directory. Change the directory and then try again.

    Also, make sure you are logged in as a regular user and that all the permissions are set.

    BTW, on what system are you trying to install IRAF? Is it Fedora?

  4. i’m using fedora 8…i try mkiraf in root home and it works but if i try in iraf home log as su it doesn’t work…maybe attribute problems?

  5. ops…i confused /home/iraf/ with /iraf/:
    i have an user that is beppe. If i try under /home/beppe/ or /home/iraf/ it doesn’t work if i try under /iraf/beppe/ it works.
    Maybe root in the root directory can do everything…

  6. In Fedora 9 the “libtermcap” package doesn’t work. You need to install “ncurses” and then create in /usr/lib a link ‘libtermcap.so.2’ pointing to ‘libncurses.so’. It worked for me. Thanx for the tutorial!

  7. 2 days later I do the same installation and everything changed: now I have to link the file libncurses.so.5 in the /lib folder (not the /usr/lib) using the same name for the link i used before (libtermcap.so.2)

  8. Hi!When I am on the trial installation the command “setenv” is unknown in my system!I use fedora 8 2.6 kernel an I have a /bin/bash (shell).
    “bash: setenv: command not found” is exactly what it says!What is the problem?
    Thank you!
    anna.

    • The “setenv” command is built in csh, not in bash. If you look at step 1 in my post, it says you should choose csh as your login shell.

      I switched to csh before starting the installation, so I’m not sure it works changing in the middle of it.

  9. well i changes my bash shell into csh in the middle.I run the trial installation and then the regular.I have a problem with the command mkiraf!my catalogs are the same as yours.I tried mkiraf and /usr/local/bin/mkiraf but it didnt work!Can you help me on this?I would appreciate!
    Thanks again!!!!

  10. I think you are doing /usr/local/bin/mkiraf from the wrong folder. Can you find this file (mkiraf) on your computer at all?

  11. I run installation steps as iraf user because as root I had problems with the command setenv!But the install script run like you wrote in your manual!

  12. The contents of /usr/local/bin/ can only be changed if you are root, so if you run the installation as “iraf user” files like mkiraf will not be created.

    We should go back to setenv then. If you go in root mode with su -, then change the login shell to csh… does setenv work? If not, what is the error you get?

  13. Ive already chosen /bin/csh (i installed the csh shell with the command yum install csh through my terminal.)But still the command setenv doesnt work :-bash: setenv: command not found is what I get!(I havent directory /usr/local/bin/ , I have /home/iraf/local/bin,so the /usr/local/bin is a directory tha I have to make?)

  14. You are still running as bash, not as csh. This is why your error (setenv: command not found) comes from bash.

    Okay… in the terminal, go as root and type
    $ yum install csh
    again. If it will tell you that the package already exists, then it’s all fine… otherwise the first installation didn’t work. The command setenv is part of the tcsh package (installed with the command above), so you must have it if the installation is correct.

    Regardless of whether the package was already installed or not, stay as root and type
    $ whereis tcsh
    in the terminal. What folders/files does this command return?

  15. well it says that I had already installed the latest version of tcsh shell!then as root I typed $whereis tcsh and this is what i get :tcsh: /bin/tcsh /usr/share/man/man1/tcsh.1.gz

  16. Excellent! That’s exactly what you should have gotten. Now stay as root and type
    $ tcsh

    This should change your login shell from bash to tcsh. You can revert to bash anytime by typing
    $ bash

    So, as root, in a tcsh window, type only the first letters from setenv (e.g. seten) and click Tab. Does it find setenv? If it does, it should automatically complete the missing letters. You might have two commands (setenforce and setenv), but as long as one of them is setenv is okay. Can you find setenv this way?

    If you do, try running
    $ setenv iraf /home/iraf
    again. Does it work?

  17. I stucked again!I searched for libtermcap files but the search failed and says that running the transaction failed (packagekit error).you know anything about this?

  18. i installed it with yum command and the libtermcap is : /usr/lib/libtermcap.so that means that the file is already installed!but cl command doesnt work!

  19. Hi —

    I followed your setup instructions for my laptop running fedora 8, and cl fires up ok now for the user iraf (although not for my original username). But that’s ok — because I can easily access all my files as iraf — I’m the only user on this box.

    The problem is that I can’t get xgterm.
    It reports that it is making xgterm the terminal type on firing up cl (or ecl as it appears in the prompt) — but when I get to use the splot feature in onedspec (what I’m really after with all this) I just get a screen full of characters — no image.

    xgterm is not found as a command, and it is not in the /usr/local/bin directory, where I think one info page I googled said it should be.

    Also — I don’t whether this is relevant or not — but there is nothing in the X11iraf directory… shouldn’t there be some X stuff in there…?

    Any ideas….?

  20. Hello Georgina. Thank you very much for putting together this website. Every couple of years or so I have to install iraf when I get a new laptop and I keep forgetting the steps in between installations. Your website was a big help on installing iraf on a dell laptop running fedora 9.

    I am having a problem and I would like to ask for your insight. Iraf has no trouble displaying fits images but when I try to use imexamine it seems that iraf gets comfused on the pixel coordinates and bombs. Lucky for me ximtool works but I would rather use ds9 if possible. Do you have any suggestions? Many thanks

    -Mike

  21. Hi i am trying to create the directories in my iraf account using the mkdir command but have a connot create directory `/home/irafbin’ : Permission denied message in return can you give some help ?

    • Are the permissions/ownership set correctly? What if you create the directory as admin and then give your iraf account full permissions to irafbin?

      Also, Young posted a comment above, asking if the directory structure is correct. I think it is, but I changed my computer since doing the IRAF installation, so there is no way to check. If you have problems setting up the directory tree the way I posted it, try creating all the directories in a big iraf folder (see Young’s comment).

  22. Thanks, I have the problem solve, just one more question for the directory $ /home/irafbin/bin.redhat if I am using a fedora linux should I type the command as $ /home/irafbin/bin.fedora?

  23. Just forget about my last question, I just mess up. After reading your’s and other’s post I found out that I could just create the directory as
    /home/irafbin/bin.redhat

  24. Hi,
    Thank you for iraf installation manul. We have another problem in iraf we don’t no how to install stsdas and tables, please give me help page
    for installing this.

    with regards
    Mahadev P.

  25. I am unable to download package ds9 for IRAF. I have followed following command in command terminal
    yum install ds9

    But it is not working.

    Add/remove software
    option is not available for my os. (fedora 8)

Leave a reply to Anna Cancel reply