2

I've downloaded the precompiled binary for sagemath 9.1(sage-9.1-Ubuntu_18.04-x86_64.tar.bz2), I'm on ubuntu 20.04. After extracting the file when I run ./sage in the terminal it says bash: ./sage: Permission denied. I made the file executable by changing the permission but then it says ./sage: no Sage installation found in $SAGE_ROOT = /home/my_pc/Downloads/SageMath. Can anyone help me with this?

1 Answers1

3

The Sage installation guide says:

If your operating system does not provide SageMath, you can also use a pre-built binary...
Installation from a pre-built binary tarball is an easy and fast way to install Sage. 
Note that on GNU/Linux a preferred way is to use your package manager (e.g. apt, pacman, yum).

Sagemath has packages for the following operating systems:

On GNU/Linux Debian version >= 9, Ubuntu version >= 18.04, Arch Linux
there are three packages to install 
• sagemath (for the binaries) 
• sagemath-jupyter (for the browser interface) 
• and the documentation
which is called sagemath-doc-en on Debian/Ubuntu and sagemath-doc on
Arch Linux.

Using Apt-Get

First, try installing sagemath using the following command in your terminal because your OS is higher than Ubuntu 18.04.

sudo apt-get install sagemath sagemath-jupyter sagemath-doc-en

Then you should be able to run sage from the command line.

Using a Pre-Built Binary

It says you can extract the tarball to a folder in your home directory and run ./sage, which it seems you have done. If it didn't work from there, you can try installing from the package manager.


Source Links: Sage installation guide

iskyfire
  • 739
  • 4
  • 8
  • I want to know how to install it using the pre-built binary as I have certain circumstances. I read the installation guide. After some tweaks, I found that in the file named ```relocate-once.py``` there was a problem in the declaration for the python env after I changed it to ```pyhton3``` it started ```Rewriting paths for your new installation directory``` then it gave an error ```/home/my_pc/Downloads/SageMath/local/bin/python3: line 1: ./python3.7: No such file or directory```. I checked it the file exist but for some reason it doesn't execute it. That's where I'm stuck now. – DEBOJIT KUMAR DAS Aug 10 '20 at 10:09
  • What error do you get with `sage -python` – iskyfire Aug 10 '20 at 11:26
  • After the modification that I've mentioned, it gets stuck with the error ```/home/my_pc/Downloads/SageMath/local/bin/python3: line 1: ./python3.7: No such file or directory```. When I went to the directory the file ```python3``` exist. It seems that the script ```python``` (which just has one execution command in it, i.e. ```./python3.7```) has some trouble running. And it returns that error. – DEBOJIT KUMAR DAS Aug 10 '20 at 14:40
  • I was able to install sage 9.2. With some modifications to the `relocate-once.py` file, where I had to change `#!/usr/bin/env python` --> `#!/usr/bin/env python3` for my system. I [downloaded](http://mirrors.mit.edu/sage/linux/64bit/index.html) the tarball and after extraction followed the instructions in the [installation guide](https://doc.sagemath.org/) file. P.S. I was not able to install sage 9.1 in ubuntu 20.04. So, I installed sage 9.0 that was available via ubuntu repositories. – DEBOJIT KUMAR DAS Apr 25 '21 at 08:04