The files in this directory are the architecture dependent Ubuntu distribution files. We hope the automatic procedure described below works for you, so you don't have to download any of these files manually. With luck, you will not have to visit this page again nor read these instructions again. Please let us know if that doesn't work out for you.

(Thanks to Brent Baccala, an Ubuntu distribution for ARM chips is available here. Our test suite has not been run on it.)

Instructions for installing Macaulay2 with root access

Official repositories

Macaulay2 has been available in the official repositories since Ubuntu 21.04 "Hirsute Hippo" and may be installed using:

  sudo apt install macaulay2

The version of Macaulay2 in the official repositories may be older. To obtain the most recent version, choose one of the other options below.

Personal Package Archive

The most recent version of Macaulay2 is available for Ubuntu 18.04 "Bionic Beaver", Ubuntu 20.04 "Focal Fossa", Ubuntu 22.04 "Jammy Jellyfish", and Ubuntu 22.10 "Kinetic Kudu" using a PPA (Personal Package Archive) maintained by Doug Torrance.

To add the repository to your system, run the following command:

  sudo add-apt-repository ppa:macaulay2/macaulay2

Then you may install Macaulay2 using the following:

  sudo apt install macaulay2

Macaulay2 website

Another way to install Macaulay2 is to use the repositories we maintain on our website -- they will eventually be phased out. To do that, first prepare for installing Macaulay2 (with apt-get, gdebi-gtk, or the Synaptic Package Manager) by adding the following line to the file /etc/apt/sources.list, suitably modified as described in the table below:

    deb http://www.math.uiuc.edu/Macaulay2/Repositories/Ubuntu XXXX main
Operating system Replacement for XXXX
Ubuntu 14.04 trusty
Ubuntu 14.10 utopic
Ubuntu 16.04 xenial
Ubuntu 16.10 yakkety
Ubuntu 17.04 zesty
Ubuntu 17.10 artful
Ubuntu 18.04 bionic
Ubuntu 18.10 cosmic
Ubuntu 19.04 disco
Ubuntu 19.10 eoan
Ubuntu 20.04 focal
Ubuntu 20.10 groovy
Ubuntu 21.04 hirsute
Ubuntu 21.10 impish
Ubuntu 22.04 jammy

(Double check that you have the right replacement for "XXXX" by observing that it appears already on many other lines in that file.)

There are various ways to add that line to that file:

Another thing you should do (now) is to download and save the public key file Macaulay2-key, so you can add it to the key ring used for upgrading the system. This will allow the system to verify the signatures attached to the Macaulay2 distribution files. To add it to the key ring using the graphical user interface, access the "Software Sources" window (or program), as mentioned above, but this time select the "Authentication" tab. Click on the "Import Key File..." button, and select the previously downloaded public key file, Macaulay2-key. To add it to the key ring manually use the command "sudo apt-key add Macaulay2-key".

Another source for the key is from keys.gnupg.net.

Alternatively, the downloading and installation of the key can be accomplished by the following single command

    sudo apt-key adv --keyserver hkp://keys.gnupg.net --recv-key CD9C0E09B0C780943A1AD85553F8BD99F40DCB31

Now, using the "Synaptic Package Manager", reload the package lists from the repositories by clicking on the "Reload" button, and then click on the Mathematics (Math) section. You should see "macaulay2" on the list, available for download: click on it. It will add both "macaulay2" and "macaulay2-common" to the list of packages to be installed. (Behind the scenes, the package manager will consult our Ubuntu repository.)

Later upgrades to Macaulay2 will become available to you almost automatically. You can periodically run the Synaptic Package Manager and check for updates by clicking on "Reload" and then on "Mark all Upgrades". Alternatively, when an orange starburst icon is occasionally displayed in your task bar indicating that updates are available from Ubuntu headquarters, you may click on the icon to activate the Update Manager, and then click on "Check" to download any new package information from the software channels, including the Macaulay2 repository. If an update of Macaulay2 is available, it will be displayed at the bottom of the list, after the Important Security Updates and the Recommended Updates, among the Other Updates. Press "Install Updates" to have it installed, along with the others. (If you have not installed the Macaulay2 public key file as described above, then our update will be listed as "Not authenticated", and the "list of changes" will not be available.)

Another way to install Macaulay2, after that line is added to /etc/apt/sources.list, is with these command lines.

	sudo apt-get update -q
	sudo apt-get install -y -q macaulay2

The preferred way to run Macaulay2 is with emacs, but the installation procedure described above doesn't teach emacs how to do that. So, after Macaulay2 is successfully installed as described above, the first thing you should do is to run M2 and to issue the Macaulay2 command setupEmacs(). That will ensure that the next time you start emacs, it knows how to edit *.m2 files, and it knows that when you press the f12 key, it should start Macaulay2 running in an interactive buffer.

If the procedure above doesn't work for you, then you may install the package files manually with dpkg (they all have names of the form *.deb). They come in pairs, one containing the architecture dependent files (in this directory), and one of the the common files containing the architecture independent files and having "common" in the name.

Instructions for installing Macaulay2 without root access

You may install from a tar file, if we have provided one above. Alternatively, here is the procedure for unpacking a *.deb file yourself, which you may use on the two *.deb files mentioned above. (One of them provides the files that depend on the architecture and operating system, and the other provides the files that have the same form in all distrubtions.) We assume the *.deb file is called /tmp/Macaulay2-1.6-AAA-Linux-Ubuntu-XXX.deb, which you have chosen because you have version XXX of Ubuntu. Here "AAA" denotes your computer's architecture.

     mkdir foo
     cd foo
     ar x /tmp/Macaulay2-1.6-AAA-Linux-Ubuntu-XXX.deb data.tar.gz
     tar xzf data.tar.gz

The result will be a directory tree named "usr", which can be moved and renamed at will. After moving it, run the program bin/M2 contained within, and run the "setup()" command to set up your standard init files, as described elsewhere. Then the directory "foo" and the file "data.tar.gz" in it can be removed.