Thread: install sac

Started: 2017-02-27 22:57:05
Last activity: 2017-02-28 18:18:58
Topics: SAC Help
pragyant prada behera
2017-02-27 22:57:05
how to install sac in Ubuntu and windows?
please explain elaborately because i m new..

  • Emily Wolin
    2017-02-28 18:18:58
    Hi Pragyant,
    Here is my trusty guide to installing SAC on Ubuntu.

    *Installing SAC on Ubuntu:*
    *Get source code:*
    Download the SAC source code as a gzipped tar file and save it to a local
    directory. I will call this $WORKDIR in the steps below (but when typing
    the commands, you should replace $WORKDIR with the path to your particular
    directory). I suggest saving the source file to your home directory, or
    another directory where you keep various source code packages.
    In Terminal, go to the directory where you saved the tgz file and extract
    cd $WORKDIR
    tar xzvf sac-101.6a-source.tar.gz
    This will produce a folder called sac101.6a in $WORKDIR.

    *Install dependencies:*
    If you haven't updated your machine in a while, it is probably a good idea
    to do so before installing SAC. You will also need to install the ncurses
    and x11 packages.
    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install ncurses-dev
    sudo apt-get install libx11-dev
    I assume you already have the gcc compiler installed (type which gcc to
    confirm that you do).
    From $WORKDIR :
    cd sac-101.6a
    chmod +x configure
    chmod +x config/install-sh
    sudo make install

    *Set up SAC macro directory and startup macro:*
    You will want to set up a directory where you will keep your SAC macros. I
    will call this $MACRODIR (but again, replace $MACRODIR with the actual path
    to your directory of choice when typing the commands). Add these lines to
    a file called init.m in $MACRODIR:
    qdp off
    color on i on
    setmacro $MACRODIR

    *Add SAC to $PATH:*
    Finally, add these lines to ~/.bashrc:
    export SACHOME=/usr/local/sac
    . ${SACHOME}/bin/
    alias 'sac=$SACHOME/bin/sac $MACRODIR/init.m'
    The last command (alias sac...) will run the commands in init.m when you
    first launch SAC. This is useful for turning off the quick-and-dirty plot
    option, turning on colors for plotting, etc.

    Close the terminal you've been working in, launch a new terminal, and type
    You should now be set up to run SAC.
    Let me know if you encounter any difficulties.


    On Mon, Feb 27, 2017 at 10:25 PM, pragyant prada behera <
    pragyantpradab<at>> wrote:

    how to install sac in Ubuntu and windows?
    please explain elaborately because i m new..

    SAC Help (

    Sent from the IRIS Message Center (
    Update subscription preferences at

13:23:10 v.f0c1234e