Installing Sage in ssh/Cluster from Binary

March 23, 2017

I installed Sage from binary in my Cluster ssh account and documented it step-by-step.

For a sourceTakes more time to build and there may be debugging involved, but the end program will be better performance-wise. installation process, click here.

Downloading the Latest Sage Distribution

First thing I needed to do is download the current Sage distribution.

To find the correct distribution, type the command archStands for architecture. into the ssh/Cluster command line

[hsu01@login001 ~]$ arch

The response I got was


which means that the Linux distribution is 64-bit. If your distribution is 32-bit, it should say


My chosen Sage distribution was named sage-7.5.1-Ubuntu_16.04-x86_64.tar.bz2 , so I performed a wgetCelebrity couple name for world wide web and get. on the download link

[hsu01@login001 ~]$ wget

and got the following response:

'sage-7.5.1-Ubuntu_16.04-x86_64.tar.bz2' saved [1292051611/1292051611]

Unzipping the Sage File

Now it’s time to extract the file using tarballFor Tape ARchive. These are so ad hoc! Also, you might need to download the latest distribution of tarball. .

tar xvjf sage-7.5.1-Ubuntu_16.04-x86_64.tar.bz2

This might take a while.

If you get a broken pipe error because the server disconnects before you are able to finish extracting, follow the optional step below.

Optional: Extracting Sage While Logged Out of ssh/Cluster

What we’re going to do is to allow the making process to be running even if we’re logged out of the ssh/Cluster. To do so, we simply need to use the screen command.

[hsu01@login001 ~]$ screen

You should get a cleared commandline window as a response.

We will run tar inside this new screen.

[hsu01@login001 ~]$ tar xvjf sage-7.5.1-Ubuntu_16.04-x86_64.tar.bz2

Then detach the screen by pressing

Ctrl-A, Ctrl-D

which should prompt the response:


To resume seeing the making process, we scan simply type

[hsu01@login001 ~]$ screen -r

Run Sage

Once you are done with this process, you should be able to see a folder named SageMath if you perform the lsList files. LiSt files? List fileS?!? command.

cdChange directory. into it,

[hsu01@login001 ~]$ cd SageMath

and simply run the program by typing

[hsu01@login001 SageMath]$ ./sage

Full Disclosure

Although I have executed this process successfully before, I have been also unable to complete it this time due to lack of disk space (disk quota exceeded error). I have already downgraded from source to binary, and at this point find the limiting disk space unreasonable given the circumstances Sage is a fairly standard program amongst mathematicians. Thus, the program not being pre-installed plus the inability to install it yourself is a big impediment to work. As a response, I’ve asked Tufts to include SageMath as a preinstalled package or allow for more diskspace. .

Luckily, the algorithm I need to run only requires small changes to run completely in Python. If this is not the case for you, and you encounter the same disk quota issues, I encourage you to contact your system administrators immediately.

Additional Resources

SageMath Installation Guide

Understanding the Cluster

Installing Sage in ssh/Cluster from Binary - March 23, 2017 - Hang Lu Su