0

I have installed the astronomy software CASA in my computer, and I would like to be able to run it from any directory just by typing casa in the Ubuntu terminal. What should I change so that this is possible? I've tried the following:

sudo ln -s ./home/alcrespe/Desktop/casa-prerelease-4.7.0-22/bin/casa ./usr/bin/casa

... but it doesn't work. I'm no expert in Ubuntu, how can I fix this? As the previous line suggests, so far I can only access the program CASA in the following location:

./home/alcrespe/Desktop/casa-prerelease-4.7.0-22/bin/casa

1 Answers1

2

You have two issues to address from my finds:

  1. Doing it right:

    • You are obviously not following the steps correctly as I did and have successfully ran it using casa command, though the link says casapy.
    • Solution please follow the steps verbatim.

      • sudo mkdir /usr/local/bin/CASA
      • sudo mv casapy-30.0.9860-001-64b.tar.gz /usr/local/bin/CASA
      • cd /usr/local/bin/CASA
      • sudo tar zxvf casapy-30.0.9860-001-64b.tar.gz
      • Add this to your ~/.bashrc file and then source it with source ~/.bashrc:
        • export PATH=$PATH:/usr/local/bin/CASA/casapy-30.0.9860-001-64b/bin
      • Test it with: casa
      • Output:

         george@george-ubuntu-server:~$ casa
        
         =========================================
         The start-up time of CASA may vary
         depending on whether the shared libraries
         are cached or not.
         =========================================
        
        CASA Version 5.0.0-101
        Compiled on: Thu 2017/01/05 04:33:33 UTC
        Activating service name='org.gnome.GConf'
        Successfully activated service 'org.gnome.GConf'
        Activating service name='org.gtk.vfs.Daemon'
        Successfully activated service 'org.gtk.vfs.Daemon'
        PYVER        -  2.7
        AIPS_DIR     -  /usr/local/bin/CASA/casa-stable-5.0.101
        SCRIPT_REPOS -  /usr/local/bin/CASA/casa-stable-
        5.0.101/linux/lib/python2.7/regressions/
        --------------------------------------------------------------------------------
        ls: cannot access '/usr/local/bin/CASA/casa-stable-5.0.101/linux/lib/python2.7/regressions/': No such file or directory
        --------------------------------------------------------------------------------
        ___________________________________________________________________
        For help use the following commands:
        tasklist               - Task list organized by category
        taskhelp               - One line summary of available tasks
        help taskname          - Full help for task
        toolhelp               - One line summary of available tools
        help par.parametername - Full help for parameter name
        ___________________________________________________________________
        ------------------------------------------------------------------------------------------
        
        {'dirs': {'xml': '/usr/local/bin/CASA/casa-stable-5.0.101/xml',
        
        'pipeline': None, 'python': '/usr/local/bin/CASA/casa-stable-5.0.101/lib/python2.7', 'data': '/usr/local/bin/CASA/casa-stable-5.0.101/data',
        'recipes': '/usr/local/bin/CASA/casa-stable-5.0.101/lib/python2.7/recipes', 
        'rc': '/home/george/.casa', 'root': '/usr/local/bin/CASA/casa-stable-5.0.101'}, 
        'files': {'logfile': '/home/george/casa-20170425-095553.log'},
        'source': {'url': 'https://svn.cv.nrao.edu/svn/casa/trunk', 'revision': '39214'}, 
        'state': {'unwritable': set([]), 'startup': True, 'init_version': 0}, 
        'helpers': {'info': None, 'viewer': 'casaviewer', 'crashPoster': '/usr/local/bin/CASA/casa-stable-5.0.101/bin/CrashReportPoster', 'dbus': '/usr/local/bin/CASA/casa-stable-5.0.101/lib/casa/bin/dbus-daemon', 'logger': 'casalogger', 'ipcontroller': '/usr/local/bin/CASA/casa-stable-5.0.101/lib/casa/bin/ipcontroller', 'ipengine': '/usr/local/bin/CASA/casa-stable-5.0.101/lib/casa/bin/ipengine'}, 
        'build': {'version': '5.0.0-101', 'number': '39214', 'time': 'Thu 2017/01/05 04:33:33 UTC'}, 'flags': {'/usr/local/bin/CASA/casa-stable-5.0.101/lib/python2.7/casapy.py': ''}}
         ------------------------------------------------------------------------------------------
         Activating auto-logging. Current session state plus future input saved.
         Filename       : ipython-20170425-095554.log
         Mode           : backup
         Output logging : False
         Raw input log  : False
         Timestamping   : False
         State          : active
         *** Loading ATNF ASAP Package...
         *** ... ASAP (rev#3110) import complete ***
        
         CASA <2>:    
        
  2. Library issues. The latest version works on Ubuntu Xenial, and the version your installing might not work on your version of Ubuntu as I discovered when I tried to install your version 4.* on it. So get back to your instructor for further help.

Important Note:

You might want to install it on a Virtual Device as I noticed your version insisted on creating a user with id 1001 irrespective of who owns that id. In my case the user koko was made the group owner of the /usr/local/bin/CASA/* directory. Permission given to folder:

drwxr-xr-x 11  12998   1001      4096 Jan  5 06:09 casa-stable-5.0.101/

Change the casapy-30.0.9860-001-64b to the one you download or the name seen there after extraction

Source:

https://casaguides.nrao.edu/index.php/Installing_CASA

George Udosen
  • 37,534