How to install SageMaths on ubuntu

how i got to install sage on ubuntu..

Sage is a free open-source mathematics software system licensed under the GPL. It combines the power of many existing open-source packages into a common Python-based interface.
you can read more about sage here
unfortunately sage is not available in the Ubuntu repositories and in-fact any repositories as a .deb package. ( at the time of writing this). did you say compiling? dont even go there i tried building it. and failed woefully. fortunately i found a nice and easy to install it on Ubuntu. there is a binary package already compiled for Ubuntu. which makes installation on Ubuntu quite easy and straight forward.

first we download the ubuntu binary here the guide is based on version 3.1.4 so i just did


the above link seem to be broken. although i have not tried it. but this link should work

Ubuntu 8.0.4
wget -c

Ubuntu 8.10
wget -c

once downloaded . i untar it (extracted the archive)
in my case

tar xzvf sage-3.1.4-ubuntu32-intel-XEON-x86-i686-Linux.tar.gz

then i moved it to /usr/local/src/

sudo mv sage-3.1.4-ubuntu32-intel-XEON-x86-i686-Linux /usr/local/src

then i copied the sage script in to /usr/local/bin

sudo cp /usr/local/src/sage-3.1.4-ubuntu32-intel-XEON-x86-i686-Linux/sage /usr/local/bin

then i edited SAGE_ROOT in /usr/local/bin/sage to point to /usr/local/src/sage-3.1.4-ubuntu32-intel-XEON-x86-i686-Linux

gksu gedit /usr/local/bin/sage

modified it to look like this

# Set SAGE_ROOT to the location of the sage install.

i modified the sage root directory permission settings
sudo chmod -R 755 /usr/local/src/sage-3.1.4-ubuntu32-intel-XEON-x86-i686-Linux

now run you can run it


to get a webbased ui
run notebook()

hope someone finds this useful

Subscribe to True Colours

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.