Skip to main content

Installing IRAM GILDAS on Ubuntu

    Figure: Screenshot of GILDAS MAPPIN in action viewing an imported FITS spectral cube.

Fore information on IRAM GILDAS, see

NOTE: Updated for Ubuntu 16.04 Xenial Xerus and above.
Nowadays the readme file on the IRAM webpage gives pretty good instructions for Linux as well:

First download the source code from

named "gildas-src-mmmyya.tar.gz" where "mmm" is month e.g. Oct, and "yy" is year e.g. 16 and "a" is some letter which signifies the release number, starting with a.

Unpack and enter the directory (it will be installed in the same directory as the unpacked directory, but with "exe" instead of "src" in the name):
tar -xvzf gildas-src-mmmyya.tar
cd gildas-src-mmmyya
For the new GNOME3 framework, we still need to download libgtk2.0. Hence the dependencies are (including optional dependencies):
sudo apt install gfortran g++ libgtk2.0-dev python-dev python-numpy libblas-dev liblapack-dev libfftw3-dev libcfitsio3-dev

export GAG_SEARCH_PATH="/usr/lib:/usr/lib/x86_64-linux-gnu"
export gagexedir=/home/magnusp/applications/gildas-current

Then configure environment variables and similar with the bash script:

source admin/ -s /usr/lib:/usr/lib/x86_64-linux-gnu

Note: the -s flag with "/usr/lib:/usr/lib/x86_64-linux-gnu" is to add more search paths so that it find CFITSIO and PNG libraries

Here you probably get one warning, something related to some ALMA holography thing, no worries you wont need it. If you do get some other warnings, resolve those dependencies first. After this just run 

this takes a couple of minutes. Then run
make install

to finally install GILDAS. This will install it in another directory, with "exe" instead. You can move this directory some place else if you want.

Now, to set the environment variables you get a message when the "make install" script finishes, you get a message of what to add, e.g.,:
export GAG_ROOT_DIR=/path-to-gildas/gildas-exe-MMMYYa
export GAG_EXEC_SYSTEM=x86_64-ubuntu13.10-gfortran
source $GAG_ROOT_DIR/etc/bash_profile
NB: The part that says "x86_64-ubuntuXX.YY-gfortran" will be specific for your system, e.g. for the latest Ubuntu this should be "x86_64-ubuntu16.04-gfortran".
Just add the statement printed out last in in make install to the end of your .bashrc or .bashrc_profile file (e.g., "nano ~/.bashrc" or "nano ~/.bash_profile").

To remove the start-up message i.e. the one that says something like this,
Selecting GILDAS version: mmYYa (21jun16 09:46 cest), executable tree, x86_64-ubuntu16.04-gfortran

every time you start a terminal you have to comment out the following lines in the file /path-to-gildas/gildas-exe-MMMYYa/etc/bash_profile :
if [ -n "$PS1" ]; then
    echo "Selecting GILDAS version: mmYYa (21jun16 09:46 cest), executable tree, ${GAG_EXEC_SYSTEM}"

that is, put hash-tags (#) in front of all the lines. 
Done! Now to run a GILDAS program just fire up the terminal and run whatever GILDAS program you want: mapping, class, astro, clic.


  1. This is great, works on my 64-bit 13.04! Thanks a bunch, the last time I've tried it, I ended up in a dependency hell I couldn't resolve.
    Also, you probably need to replace
    "comment out the following lines in the file /home/username/apps/gildas-exe-MMMYYa/etc/bash_profile"
    with something more generic like:


    1. @Vlas Sokolov : Good to hear that others benefit from this. I changed the example path to your suggestion. Thanks!

  2. Hi! Thanks for the post and hints. I've tried to install GILDAS under /usr/local/bin so that several users from my institute could run it from a server. Unfortunately, the make command issues an error message saying it cannot create a directory under /usr/local/bin. I've tried to run it as superuser, but it still cannot create the directory during the installation. Have you seen this problem before? Regards!

    1. Hi Helio Jaques Rocha. I don't think that installing GILDAS directly under /usr/local/bin is a good idea. Just install it in a common directory (say '/common/gildas-current'), make that directory readable by all users (chmod +r /common/gildas-current), and then make sure all users have the export and source lines in their .bashrc/.bash_profile file. i.e.

      export GAG_ROOT_DIR=/common/gildas-current
      export GAG_EXEC_SYSTEM=pc-debianwheezy-gfortran <-- IF this is your system!
      source $GAG_ROOT_DIR/etc/bash_profile

      Then all users that log on to the server should be able to run the program (and use the GUI given that they have X11 forwarding activated).

      Hope it works out!

  3. Hi!
    Thanks for this guide, the full dependencies fixed a problem I had at the make stage with gtk.

    However the make now fails when trying to link to the libraris libgio and libgobject, many errors such as:

    /usr/lib/x86_64-linux-gnu/ undefined reference to `g_variant_dict_end'

    Do you possibly have any suggestions here?

    Many thanks!

    1. Hi,
      great to hear that you find it useful. To be honest I have no idea what it can be.

      However, did you check that you have "libglib" installed, it contains the "libgio" library (


    2. Yep! It appears to be installed using both apt-get and ldconfig, and is in the directory make thinks it is (as in, /usr/lib/x86_64-linux-gnu/ is real, present and version 2.40.2).

      Thank you anyway :-).

  4. Thank u so much!!!

    Excelent post


Post a Comment

Popular posts from this blog

Screen brightness using Fn keys in i3wm on Lenovo Thinkpad X260

Screen brightness using Fn keys in i3wm

I got a new laptop for work, Lenovo Thinkpad X260. Installed Ubuntu 16.04 Xenial Xerus without much problem.
There are several Fn-hotkeys for the F1-F12 keys, most of them do not work out of the box in Ubuntu, at least not when running i3-window manager.
I managed to solve it in the end. This is how. Part of this solution is from
Thanks for that!

Changing the brightness I figured out that the brightness can be changed with

$ sudo echo VALUE > /sys/class/backlight/intel_backlight/brightness

where VALUE is between 0 and what is given by the output

$ cat /sys/class/backlight/intel_backlight/max_brightness

These paths might be different for you, so you have to figure it out, and edit the paths in the script below to fit your needs.
The script So I created a script that changes the brightness, as mentioned it borrows heavily from the above mentioned page, but there are some changes.

I save it a…

Installing SMA MIRIAD on Ubuntu (2014/05)

What is MIRIAD? See for information.

Edit : Tested on the Ubuntu 13.04 Raring Ringtail
Edit2 : Tested on the Ubuntu 13.10 Saucy Salamander
Edit3 : Tested on the Ubuntu 14.04 Trusty Tahr

I am not 100% sure about the prerequisites, it should work with the ones below, however (especially after installing IRAM GILDAS).
sudo apt-get install build-essential pgplot5 gfortran libreadline-dev libforms-bin csh cvs Then go and grab the latest binary release from : Got into catalog with highest number. At time of writing this is "2014.7". Choose miriad_linux64_u14_gfortran.tar.gz for Ubuntu.
Unpack it where you want it to install:
tar zxf miriad_linux64_BINARY_gfortran.tar.gz where "BINARY" is your Ubuntu version i.e.  miriad_linux64_u14_gfortran.tar.gz for Ubuntu 14.04.

Enter the catalog and run the "install script":
cd miriad
install/make_miriad_starts then to source the miriad binari…