Thursday, May 22, 2014

Installing ESO Scisoft on Ubuntu 14.04 64-bit


European Southern Observatory's Scisoft is a collection of astronomical software applications. It includes IRAF, PyRAF, MIDAS, CASA, DS9 among other data analysis, image display, and scientific libraries.

The latest version of Scisoft is 7.7. It is a 32 bit package and therefore need some external dependencies to be satisfied before it can be used on 64 bit Ubuntu.

Here are the steps I followed to install it on Ubuntu 14.04 -
  1. Downloaded the latest version in tar format from ESO Scisoft website.
  2. As root, uncompress the downloaded file :
    cd /
    sudo tar xvfz path-to-scisoft-save-dir/scisoft-7.7.0.tar.gz
    
  3. As Scisoft is 32 bit software, we need to install 32 bit external packages to resolve dependency issues. I followed the suggestion on this askubuntu.com post to install 32 bit libraries. Ran the following commands in terminal :
    sudo dpkg --add-architecture i386
    sudo apt-get update
    sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
    
  4. Following suggestion on this post, I installed the dependencies using following commands : 
    sudo apt-get install tcsh:i386 libgfortran3:i386 libreadline5:i386 
    libsdl-image1.2:i386 libsdl-ttf2.0-0:i386 unixodbc:i386
    
  5. Downloaded packages libg2c0_3.4.6-8ubuntu2_i386.deb and gcc-3.4-base_3.4.6-8ubuntu2_i386.deb from Ubuntu archive. Install both :
    sudo dpkg -i libg2c0_3.4.6-8ubuntu2_i386.deb
    sudo dpkg -i gcc-3.4-base_3.4.6-8ubuntu2_i386.deb
    
  6. I had to install libxft2, libxrandr2, and libxmu6 for xgterm and graphic windows to work in IRAF and PyRAF :
    sudo apt-get install libxft2:i386 libxrandr2:i386 libxmu6:i386
    
  7. We are all set to initialize IRAF. For the first run, run following command to set paths and environment variables :
    . /scisoft/bin/Setup.bash
    
    There is a space between dot(.) and first slash(/).
  8. Make a new directory and run mkiraf to generate login.cl file. You can customize the login file as per your requirement.
  9. To start IRAF, open a xgterm window by running xgterm & command in terminal. Type ecl in xgterm window to start IRAF session. The command should be issued in the same directory where the login.cl file is lying. Otherwise the command will fail.
  10. To start PyRAF, just type pyraf command in terminal.
  11. Test if DS9 graphic window is able to display image and you can examine the image using imexam.

34 comments:

  1. Hi, Thank you very much

    Now I install scisoft7.7 on ubuntu14.04 AMD 64-bit.

    when test of ds9 had error:

    ds9: error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory

    Also when test of aladin of virtual observatory tools had error:

    Exception in thread "main" java.lang.UnsatisfiedLinkError: /scisoft/share/java/jre/lib/i386/xawt/libmawt.so: libXtst.so.6: cannot opendirectory shared object file: No such file or directory

    How fix these errors of package scisoft7.7

    Best Regards

    Yasser Hendy

    National research institute of Astronomy
    NRIAG, Egypt

    ReplyDelete
  2. Hi, Thank you very much

    Now I install scisoft7.7 on ubuntu14.04 AMD 64-bit.

    when test of ds9 had error:

    ds9: error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory

    Also when test of aladin of virtual observatory tools had error:

    Exception in thread "main" java.lang.UnsatisfiedLinkError: /scisoft/share/java/jre/lib/i386/xawt/libmawt.so: libXtst.so.6: cannot opendirectory shared object file: No such file or directory

    How fix these errors of package scisoft7.7

    Best Regards

    Yasser Hendy

    National research institute of Astronomy
    NRIAG, Egypt

    ReplyDelete
    Replies
    1. Hi Yaseer,

      Glad to hear that the blog post helped you in installing Scisoft.

      1. The DS9 error is because the software is not able to find libXss library. Most probably the 32-bit version of the library does not exist on your machine. You can install it using following command :

      sudo apt-get install libXss1:i386

      2. Virtual observatory error is because of missing libXtst library. Use the following command to install it:

      sudo apt-get install libXtst6:i386

      I hope this resolve the issues. Do let me know if you are still getting the errors.

      - Navtej

      Delete
    2. Hi Navtej

      Thank you for your answer.

      Ds9 worked good but when login in Iraf by command cl then put !ds9 & then display dev$pix 1

      i can not see scale then (zscale, log, squared, etc) i.e scale is invisible.

      Tools of virtual observatory faladin
      (java:16005): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",or example Aladin package opend but had error:
      Gtk-Message: Failed to load module "canberra-gtk-module"

      Yasser

      Delete
    3. Hi Yasser,

      If I am not mistaken, it is a default feature in DS9 to have 'Scale' menu deactivated when image is loaded from IRAF/PyRAF using display command. You can change scale and other parameters using epar display command and then reload the image. You can activate 'Scale' menu in DS9 by going to File->Open menu and loading the FITS file.

      The error related to aladin is missing library canberra-gtk-module. Install this library using following command:

      sudo apt-get install libcanberra-gtk3-module:i386

      I was able to run aladin using following command:

      javaws /scisoft/share/VOTools/Aladin/aladin.jnlp

      I hope this helps. Let me know if it is still not working.

      - Navtej

      Delete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Thanks very much for this clear explanation!

    This worked relatively smoothly for me on Ubuntu-14.04-LTS 64-bit on
    21 Aug 2015
    with the following comments/ problems

    In step 5 the given address for the two packages was empty. I got them from
    http://old-releases.ubuntu.com/ubuntu/pool/universe/g/gcc-3.4/
    instead, and had to install gcc before the other due to dependencies.

    Iraf and DS9 worked immediately, which was the main goal, but I was hoping to have
    skycat working as well. It starts, but at no place in the application was I able to have
    any keystrokes appear. The mouse selects menus fine and happilty selects text entry box,
    but no keystrokes appear to be logged. any ideas by chance? I am unable to find any other
    issue report related to skycat alone.

    ReplyDelete
    Replies
    1. Brett,

      I also installed Scisoft with the main objective of using IRAF/PyRAF. I tried using skycat and I am also not able to enter keystrokes. BTW, keystrokes does not work in epar GUI window in PyRAF either. I thought it was a python problem but now it seems like the issue could be Tcl/Tk library. Skycat uses Tcl/Tk environment and default python GUI environment is also Tcl/Tk.

      I will have a look at it and will let you know if I am able to resolve it.

      - Navtej

      Delete
    2. Hi When i run mkiraf command in separate directory (iraf) it shows command not found . I have added manually the right path for Setup.bash in .bashrc file. Please suggest the solution.

      Delete
    3. Zahir,

      You have to restart the computer for Setup.bash command to run at when you log in to your account. You can also manually run the Setup.bash from command line as -

      . /scisoft/bin/Setup.bash

      This will set all the paths and environmental variables from Scisoft. You should be able to run mkiraf and other scisoft commands after that.

      - Navtej

      Delete
    4. Even I'm getting the same error. plus when i try to run the command for intialization here is what i get: bash: /scisoft/bin/Setup.bash: No such file or directory

      Delete
    5. Priyana,

      There is a dot(".") before /scisoft (and space between dot and /scisoft). The command is :-
      . /scisoft/bin/Setup.bash

      You should check first if Scisoft is installed by going to /scisoft directory.

      - Navtej

      Delete
    6. This comment has been removed by the author.

      Delete
    7. Hi,
      I'm having the same problem :(

      mkiraf is not found.

      How does one manually add the right path for Setup.bash in .bashrc file?

      I've executed . /scisoft/bin/Setup.bash and my bashrc didn't change at all...

      I've followed all your previous instructions closely, only point 5 didn't work because these packages were not available on the archive anymore :/

      if you can help me solve this mkiraf/login.cl issue... I'm desperate.

      Delete
    8. Hi ouden,

      1. The deb packaged mentioned in step 5 can be downloaded from http://old-releases.ubuntu.com/ubuntu/pool/universe/g/gcc-3.4/.

      2. Do the following to test if . /scisoft/bin/Setup.bash works -
      a) In terminal, run
      > echo $PATH
      Note down the directory path

      b) Execute Setup command
      > . /scisoft/bin/Setup.bash

      C) Run echo command again
      > echo $PATH

      Now, /scisoft/bin should be appended to the directory path list (it should be the first directory). If not then the command was not successful. Unfortunately the Setup.bash script does not give any error for few cases when it fails.

      Let me know what happens when you run the commands mentioned above. We can go from there.

      - Navtej



      Delete
    9. Thank you for your answer and time Navtej, I think (crossing my fingers) you saved my life here.

      After installing the missing packages, and executing . /scisoft/bin/Setup.bash everything seems to have gone smoothly.
      Before the command echo $PATH gave me this:

      /usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/bin:/usr/local/bin:/usr/local/bin

      After the command there is a new one indeed:
      /scisoft/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/bin:/usr/local/bin:/usr/local/bin

      so what you say fortunately did appear :)

      So now i finally managed to execute mkiraf, set xgterm and launch cl, wow! (I have tried and abandoned 2-3 times in the past, always failing at this last step, regardless of the instructions I followed). Pyraf launches as well, so i hope everything is in order now!

      So, if I may try to understand a bit better what is going on here. Most online discussions on the question of "mkiraf not found" usually advise you to add a bash command like PATH = $PATH:/usr/local/bin in .bashrc, etc.
      Isn't that completely wrong since the right path is /scisoft/... ?


      Delete
  5. While opening the ds9, it shows the following error:
    Application initialization failed: Can't find a usable init.tcl in the following directories:
    ./zvfsmntpt/tcl8.5 /tmp/linux64/saods9/lib/tcl8.5 /usr/local/lib/tcl8.5 /usr/lib/tcl8.5 /usr/local/library /usr/library /usr/tcl8.5.9/library /tcl8.5.9/library
    This probably means that Tcl wasn't installed properly.
    Error in startup script: couldn't read file "./zvfsmntpt/src/ds9.tcl": no such file or directory

    what should be the remedy ?

    ReplyDelete
  6. Hi,
    I had installed scisoft following your instructions. It worked fine. Now I want to remove it completely. How do I do that?

    ReplyDelete
    Replies
    1. Just remove the /scisoft folder:

      > sudo rm -fr /scisoft

      Delete
  7. This comment has been removed by the author.

    ReplyDelete
  8. Hi, thanks for the instructions. I get a /usr/sbin/.: Permission denied.
    message even though I'm the root when I run the ". /scisoft/bin/Setup.bash". Any ideas?
    Thanks!

    ReplyDelete
    Replies
    1. Even if you get the error, paths and environment variables may already be set for you to run IRAF/Pyraf and other Scisoft software. In Setup.bash file, /usr/sbin/sestatus is called to check if SELinux is enabled on the computer. If SELinux is enabled, pyraf may have some issues. I suppose you can ignore the error and see if you can still use IRAF/Pyraf without any issues.

      Delete
  9. Hi Thank you very much for your manual. I have a problem with creating
    login.cl. I made a directory name "iraf" and then ran "mkiraf" but I got this message:

    ------------------------------------------------------
    nani@nani-nasa:/iraf$ mkiraf
    -- creating a new uparm directory
    mkdir: cannot create directory ‘uparm’: Permission denied
    Terminal types: xgterm,xterm,gterm,vt640,vt100,etc.
    Enter terminal type:
    ------------------------------------------------------

    and when I give a terminal type for example xgterm it says:

    Enter terminal type: xgterm
    _sed: Permission denied.
    _sed: Permission denied.
    _sed: Permission denied.
    _sed: Permission denied.
    _sed: Permission denied.
    login.cl: Permission denied.
    rm: cannot remove ‘_sed’: No such file or directory
    A new LOGIN.CL file has been created in the current directory.
    You may wish to review and edit this file to change the defaults.
    [1]+ Done xgterm



    what should I do now? please help me !

    ReplyDelete
    Replies
    1. Hi,

      Seems like you have created iraf folder under root (/). Only root user has access to create directory and files in under /. You should create the iraf folder under your own home directory (/home/nani) i.e. /home/nani/iraf. And then run mkiraf in /home/nani/iraf directory.

      Hope this helps.

      - Navtej

      Delete
    2. Dear Navtej,

      Thank you very much for your helpful instruction.
      It's working now.

      Regards,
      Nasrin

      Delete
  10. Hi,
    After executing . /scisoft/bin/Setup.bash and my bashrc didn't change at all. I've executed all steps successfully and I tried 'echo $PATH' as well. But after setup command, when I execute echo $PATH, I got the same thing as before..i.e
    /usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/bin:/usr/local/bin:/usr/local/bin
    Please tell me the solution for this

    ReplyDelete
  11. Late addition: In Ubuntu 18.04, you will find many of the packages natively that were provided by Scisoft. This includes Aladin, IRAF, PyRAF, Topcat, MIDAS, saods9 and so on.

    ReplyDelete
  12. This comment has been removed by the author.

    ReplyDelete
  13. I followed all the commands
    But after the 7th command it says no says no such directory

    ReplyDelete
  14. sudo apt-get install tcsh:i386 libgfortran3:i386 libreadline5:i386
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package libgfortran3:i386
    //HOW I D0 this step

    ReplyDelete
  15. Hi I have installed scisoft-8_64bit in ubuntu 18.04 and it is providing midas also. Can you please tell me how to initialize midas?

    ReplyDelete