3.2.1 System-wide install

This is a compilation of posts to the Sage support list (in particular those of Luis Finotti).

  1. Unpack the current Sage tarball (we shall assume it is sage-2.5.2.tar) at, e.g., /usr/local/ and compile it as root. Assuming you are in a root shell and the tarball is in your current directory, type:

    cp sage-2.5.2.tar /usr/local
    cd /usr/local
    tar xvf sage-2.5.2.tar 
    cd sage-2.5.2/
    make
    

    Comment: It's better to build in place. It's a bug if anything goes wrong when relocating the entire tarball - unfortunately there is one bug I haven't fixed along these lines, namely the PARI install hard-codes the location of the "galois data" files. (Fixes welcome!)

  2. Make sure to modify the line with the ``....."'s at the top of the sage script. In other words, edit SAGE_ROOT="....." to say SAGE_ROOT="/usr/local/sage-2.5.2".

  3. There are some initial files that have to be created during the first run of SAGE. Try starting up SAGE once as root (or, to be more thorough, try make test as root to run all the standard test code). You can stop the tests by pressing ctrl-z followed by typing kill %1 (assuming you had no other jobs in the background of that shell).

  4. Make a copy of the sage script in /usr/local/bin:
    cp /usr/local/sage-2.5.2/sage /usr/local/bin/
    
    You make a copy instead of a symlink, since upgrading Sage (with sage -upgrade) overwrites /usr/local/sage-2.5.2/sage, hence deleting the ROOT=... part of that file.

    Make sure that all files in /usr/local/sage-2.5.2 are readable by all:

    chmod a+rX -R /usr/local/sage-2.5.2
    

See About this document... for information on suggesting changes.