1

So I was following the instructions here - https://help.ubuntu.com/community/SAGE

  • The apt get command on your link doesn't find anything.

  • And what is this instruction of putting a link to the "sage executable in /usr/local/bin"

So in my current folder structure I find, ~/Desktop/sage/sage-6.4-x86_64-Linux/src/sage

Is this the "sage executable"?

Guessing so, I did this (as per the above link)

ln -s ~/Desktop/sage/sage-6.4-x86_64-Linux/src/sage /usr/local/bin/sage

But then doing the above yields a link to this in /usr/local/bin called "sage".

But that link doesn't work.

(the sub-folder "sage" of Desktop is something that I created into which I unzipped the file I downloaded from the mirror - the downloaded folder called itself by that name, "sage-6.4-x86_64-Linux" and its subfolders are what it anyway came with)

What am I getting wrong?

muru
  • 197,895
  • 55
  • 485
  • 740
Student
  • 111
  • Yes - anyway I can confirm? – Student Nov 21 '14 at 18:33
  • It said "trusty". I think I am on "14.04 LTS" – Student Nov 21 '14 at 18:36
  • Excellent. You can use the PPA: https://launchpad.net/~aims/+archive/ubuntu/sagemath – muru Nov 21 '14 at 18:39
  • 2
    @muru that is the first step in his link... – Mateo Nov 21 '14 at 18:41
  • Okay - so I have to just run those 3 commands one after another? - and nothing else? - how do i run sage after that? – Student Nov 21 '14 at 18:42
  • @Anirbit Since you already ran those commands, are you on a 32-bit system? What does uname -m say? – muru Nov 21 '14 at 18:43
  • @muru I get the same errors as before after the last step, "Reading package lists... Done Building dependency tree
    Reading state information... Done Package sagemath-upstream-binary is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

    E: Package 'sagemath-upstream-binary' has no installation candidate "

    – Student Nov 21 '14 at 18:45
  • @muru uname -m says "i686" – Student Nov 21 '14 at 18:45
  • @Anirbit there's the problem. You're trying to run 64-bit binaries on 32-bit Ubuntu, and the PPA only supports 64-bit. Download the 32-bit binaries. Or install 64-bit Ubuntu. There's no reason not to use 64-bit Ubuntu. – muru Nov 21 '14 at 18:47
  • @muru How do I upgrade to a 64-bit Ubuntu? – Student Nov 21 '14 at 18:48
  • @Anirbit it's possible but very risky: http://askubuntu.com/questions/5018/is-it-possible-to-upgrade-from-a-32bit-to-a-64bit-installation. It's simpler to do a fresh install. – muru Nov 21 '14 at 18:49
  • @muru Any way to do a fresh install online? – Student Nov 21 '14 at 18:50
  • @Anirbit I'm not sure what you mean. – muru Nov 21 '14 at 18:53
  • @muru Can you explain how to do a fresh install? Like can I avoid having to burn a new disk? Are there versions of sage which work on 32 bit? – Student Nov 21 '14 at 18:55
  • @Anirbit Yes, you can use 32-bit Sage. The files will have i686 in the name instead of x86_64. – muru Nov 21 '14 at 18:59
  • @muru And from where do I install that? And how can I do a fresh install of a 64 bit Ubuntu? – Student Nov 21 '14 at 19:03
  • @muru Is there some "sudo -apt get " styled installation method that will get me a 32-bit sage running for now? – Student Nov 21 '14 at 19:17
  • @Anirbit nope. You can download 32-bit the same way you downloaded 64-bit Sage, but look i686 links. – muru Nov 21 '14 at 19:35

3 Answers3

2

There's no way to getting it wrong, there isn't anything for you to miss, but here go some insights into each step:

apt-add-repository -y ppa:aims/sagemath

this add the APT to your repository, in other words it adds this location for you APT look for when trying to install new packages. It should ask for some kind of confirmation regarding the gpu key, accept it and it will add it.

apt-get update

This updates your local listing of packages tough re-downloading every packaging list you has, all the ubuntu's defaults and also the sage listings

apt-get install sagemath-upstream-binary

This one is the one who really installs sage. What is wrong?

  • While it was necessary in 2014 to add a PPA, installing Sage Math no longer requires this, and you can just write apt-get install sagemath in a standard Ubuntu. – sshine Jan 09 '22 at 09:26
1

Since this question was asked in 2014, Sage Math has become a part of the standard Ubuntu distribution:

sudo apt install sagemath

So you don't need to add any PPAs at this point.

sshine
  • 133
0

To allow sage to work in bash, you need to install realpath:

sudo apt-get install realpath

Assuming your link is to the executable, and that /usr/local/bin is in your PATH variable, you should be able to run sage by just typing sage in a terminal.

ubfan1
  • 17,838