-
Notifications
You must be signed in to change notification settings - Fork 259
Installing Macaulay2 in Linux
Debian and its derivatives use the apt
package manager. Macaulay2 has been available in the official Debian repositories since 2020, so you may install it using
sudo apt install macaulay2
Unless you are running Debian unstable or testing, this will likely be a slightly out-of-date version. The Macaulay2 developers host packages for the latest version of Macaulay2 in third-party repositories.
Macaulay2 packages are available for all supported releases of Ubuntu (currently 18.04, 20.04, 22.04, 24.04, 24.10, and 24.05). Run the following:
sudo add-apt-repository ppa:macaulay2/macaulay2
sudo apt install macaulay2
Alternatively, if you would like to try out the latest development version of Macaulay2, run the following:
sudo add-apt-repository ppa:profzoom/macaulay2
sudo apt install macaulay2
The directions are slightly different based on your version of Debian.
The latest version of Macaulay2 should appear in the official package repositories for these distributions very shortly after release.
sudo apt update
sudo apt install macaulay2
This will also work in stable Debian distributions, but it will install an older version of Macaulay2. It is better to install the packages hosted on the Macaulay2 website:
sudo apt update
sudo apt install ca-certificates wget
sudo wget -O /etc/apt/sources.list.d/macaulay2.sources https://macaulay2.com/Repositories/Debian/trixie/macaulay2.sources
sudo apt update
sudo apt install macaulay2
sudo apt update
sudo apt install ca-certificates wget
sudo wget -O /etc/apt/sources.list.d/macaulay2.sources https://macaulay2.com/Repositories/Debian/bookworm/macaulay2.sources
sudo apt update
sudo apt install macaulay2
sudo apt update
sudo apt install ca-certificates wget
sudo wget -O /usr/share/keyrings/macaulay2-archive-key.asc https://macaulay2.com/Repositories/Debian/macaulay2-archive-key.asc
sudo wget -O /etc/apt/sources.list.d/macaulay2.sources https://macaulay2.com/Repositories/Debian/bullseye/macaulay2.sources
sudo apt update
sudo apt install macaulay2
Fedora, Red Hat Enterprise Linux, and RHEL-compatible distributions like Rocky Linux and AlmaLinux use the dnf
package manager.
Macaulay2 is available in the official Fedora repositories, and may be installed using the following:
sudo dnf install Macaulay2
The version in the official repositories may be slightly out of date. To obtain the latest version from the Macaulay2 website, run the following:
curl -O https://macaulay2.com/Repositories/Fedora/Macaulay2.repo
sudo mv Macaulay2.repo /etc/yum.repos.d/
sudo dnf install Macaulay2
Macaulay2 is not available in the official repositories for RHEL and compatible distributions like Rocky Linux and AlmaLinux. However, packages are hosted on the Macaulay2 website. Run the following:
curl -O https://macaulay2.com/Repositories/Scientific/Macaulay2.repo
sudo mv Macaulay2.repo /etc/yum.repos.d/
sudo dnf install Macaulay2
If you do not have sudo
privileges on your system, then you may install Macaulay2 by downloading an rpm from the website and installing it into your home directory.
In this example, we assume that you have downloaded the appropriate rpm to /tmp
and would like to install the files in ~/foo/bar
. Adjust the filename of the downloaded rpm accordingly.
mkdir temp
cd temp
rpm2cpio /tmp/Macaulay2-1.25.06-0.1.m2.el9.x86_64.rpm | cpio -idm --no-absolute-filenames
mv usr ~/foo/bar/
cd ..
rmdir temp
Now start
~/foo/bar/bin/M2
and use the Macaulay2 command
setup()
to record the location of M2 in your login startup files. Note that you may encounter error messages such as "cannot open shared object file" if certain system libraries are missing.
Macaulay2 is available in AUR, the Arch User Repository. To build and install:
git clone https://aur.archlinux.org/macaulay2.git
cd macaulay2
makepkg -s
sudo pacman -U macaulay2-*.pkg.tar.zst
Macaulay2 bottles are available for x86_64 Linux systems through Homebrew. Follow the instructions on this page, or simply enter the following to install the Macaulay2 tap and bottle:
brew install Macaulay2/tap/M2
Homepage | Projects | Packages | Documentation | Events | Google Group