安装 Maculay 2

安装 Maculay 2

我需要在 ubuntu 16.04 LTS 上安装 Macaulay 2(一个专门用于支持代数几何和交换代数研究的软件系统)。我已经下载了 Macaulay2-1.9.2-amd64-Linux-Ubuntu-16.04.deb 文件,但我无法安装它。

答案1

由于我已经安装了这个包,所以我运行这个命令:

apt show macaulay2

其输出为:

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.

如您所见,macaulay2-common (= 1.9.2), libblas3, libc6, libgc1c2, libgcc1, libgdbm3, liblapack3, libmpfr4, libreadline7, libxml2所需的包macaulay2已成功安装。

因此,在安装之前,您还需要安装依赖库macaulay2

sudo apt update    
sudo apt install libblas3 libc6 libgc1c2 libgcc1 libgdbm3 liblapack3 libmpfr4 libreadline6 libxml2

然后你需要下载macaulay2macaulay2-common从其官方网站

因此macaulay2-common请先安装,然后尝试安装macaulay2

sudo dpkg -i Macaulay2-1.9.2-common.deb
sudo dpkg -i Macaulay2-1.9.2-amd64-Linux-Ubuntu-16.04.deb

为了测试它,你可以M2在 shell 中输入,然后输入2+2

M2
Macaulay2, version 1.9.2
with packages: ConwayPolynomials, Elimination, IntegralClosure, LLLBases,
               PrimaryDecomposition, ReesAlgebra, TangentCone

i1 : 2+2

o1 = 4

答案2

 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.)

答案3

如果双击该文件,它会打开 Ubuntu 软件中心来安装 deb 文件。如果这不起作用,您可以打开终端并输入sudo dpkg -i /path/to/deb/file.deb(将 /path/to/deb/file 替换为 deb 文件的路径),然后单击 Enter,然后输入(或粘贴)sudo apt-get install -f

答案4

我按照此处的说明成功安装了 v2.1.14:http://www2.macaulay2.com/Macaulay2/Downloads/GNU-Linux/Ubuntu/index.html

总结:在 /etc/apt/sources.list.d/macaulay2.list 中添加此行:

deb http://www.math.uiuc.edu/Macaulay2/Repositories/Ubuntu xenial main

(如果文件不存在则创建)

跑步

sudo apt-key adv --keyserver hkp://keys.gnupg.net --recv-key CD9C0E09B0C780943A1AD85553F8BD99F40DCB31(一条线)

然后运行:

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

这将安装 v2.1.14。您需要 2.1.19 吗?还是 2.1.14 就足够了?

相关内容