sagemath
is not available in the official repositories in Noble (24.04). It was available until mantic (23.10).
Was it removed completely? Or is it going to be back? How to install sagemath in Ubuntu 24.04?
Unfortunately building from source is not an option since the gcc/g++ version 13 is so hopelessly unstable it is no longer able to build such a an enormous project without the infamous "internal compiler error" popping up constantly.
It has been completely dropped from Ubuntu 24.04 and Debian Trixie due to a sagemath bug: It fails to build in python 3.12. The sagemath developers are working on it. But it will not come back to Ubuntu 24.04 as Ubuntu does not change the software in a particular release during its lifetime.
However, once the bug is fixed upstream, sagemath will most likely come back in a later version of Ubuntu.
The workaround is to use Mamba or Conda to install sagemath, as described here.
First, install miniforge with
Then, create an environment for sage with mamba, and install sage in the environment, with python3.10:
Enter the sagemath environment with
And run sagemath with