I have to install Macaulay 2 (a software system devoted to supporting research in algebraic geometry and commutative algebra) on ubuntu 16.04 LTS. I have downloaded Macaulay2-1.9.2-amd64-Linux-Ubuntu-16.04.deb file but I can not install it.
4 Answers
Since I have already installed this package , I run this command:
apt show macaulay2
And its output is:
Package: macaulay2
Version: 1.9.2
Status: install ok installed
Priority: extra
Section: math
Maintainer: Daniel R. Grayson <[email protected]>
Installed-Size: 65.2 MB
Depends: macaulay2-common (= 1.9.2), libblas3, libc6, libgc1c2, libgcc1, libgdbm3, liblapack3, libmpfr4, libreadline7, libxml2
Download-Size: unknown
APT-Manual-Installed: yes
APT-Sources: /var/lib/dpkg/status
Description: a software system for algebraic geometry research
Macaulay 2 is a software system for algebraic geometry research, written by
Daniel R. Grayson and Michael E. Stillman. Based on Groebner bases, it
provides algorithms for computing homological invariants of rings and
modules.
.
Home page: http://www.math.uiuc.edu/Macaulay2/.
.
This package contains the architecture dependent portion of Macaulay2.
As you see macaulay2-common (= 1.9.2), libblas3, libc6, libgc1c2, libgcc1, libgdbm3, liblapack3, libmpfr4, libreadline7, libxml2
packages are required to macaulay2
has been installed successfully.
So you need to install depends libraries as well before you install macaulay2
:
sudo apt update
sudo apt install libblas3 libc6 libgc1c2 libgcc1 libgdbm3 liblapack3 libmpfr4 libreadline6 libxml2
Then you need to download macaulay2
and macaulay2-common
from its official site.
So install macaulay2-common
before, and then try to install macaulay2
:
sudo dpkg -i Macaulay2-1.9.2-common.deb
sudo dpkg -i Macaulay2-1.9.2-amd64-Linux-Ubuntu-16.04.deb
And for test it you can type M2
in your shell and then type 2+2
M2
Macaulay2, version 1.9.2
with packages: ConwayPolynomials, Elimination, IntegralClosure, LLLBases,
PrimaryDecomposition, ReesAlgebra, TangentCone
i1 : 2+2
o1 = 4
Install packages with:
sudo apt-get install -y -q autoconf bison emacs flex g++ gcc gfortran libc6-dev libcdd-dev libatomic-ops-dev libgc-dev libgdbm-dev libglpk-dev liblapack-dev libmpfr-dev libncurses-dev libncurses5-dev libntl-dev libpari-dev libreadline-dev libxml2-dev liblzma-dev libz-dev make openssh-server patch subversion time unzip xbase-clients zlib1g-dev libtool pkg-config libmpc-dev
# note: libz-dev seems to have been replaced by zlib1g-dev
# note: libncurses-dev seems to have been replaced by libncurses5-dev
# note: libreadline-gplv2-dev is an older GPL v2 version of libreadline
On all systems, add
FC=gfortran
to the environment or to the "configure" command line below. (The
program "make" has a default value of "f77" for "FC", the Fortran
compiler, but "f77" isn't available.)
On a 32-bit system, add
--with-mpir-config-options="ABI=32 --build=i686-pc-linux-gnu"
to the "configure" command line below. (The --build option is necessary
only to enable distribution of the resulting binaries to users of other
hardware.)
On Ubuntu 14.10 and later, add
--enable-build-libraries="pari givaro fflas_ffpack"
to the "configure" command line below. (The version of pari possibly installed there
will crash when M2 exits. The version of givaro that might be installed by Ubuntu
might be too recent for us.)
On all systems, add
CPPFLAGS=-I/usr/include/cdd
to the "configure" command line below. Otherwise the configure script will
decide to build cddlib from downloaded sources.
(To upgrade to a new release of Ubuntu, run "update-manager" if you want a GUI, or run
"do-release-upgrade" for a command line interface.)
If you double-click on the file it should open the Ubuntu Software Center to install the deb file. If that does not work you can open a terminal and type in sudo dpkg -i /path/to/deb/file.deb
(replace /path/to/deb/file with the path to the deb file) and click enter then following type in (or paste) sudo apt-get install -f
.
I managed to install v2.1.14 following the instructions here: http://www2.macaulay2.com/Macaulay2/Downloads/GNU-Linux/Ubuntu/index.html
Summarized: Add this line to /etc/apt/sources.list.d/macaulay2.list:
deb http://www.math.uiuc.edu/Macaulay2/Repositories/Ubuntu xenial main
(create the file if it does not exist)
run
sudo apt-key adv --keyserver hkp://keys.gnupg.net --recv-key CD9C0E09B0C780943A1AD85553F8BD99F40DCB31
(one line)
then, run:
sudo apt-get update -q
sudo apt-get install -y -q macaulay2
This will install v2.1.14. Do you need 2.1.19? or is 2.1.14 sufficient?
dpkg --simulate -i
, stops withpreparing to unpack
, no further message.