SfTian 编译安装Sagemath # 编译安装Sagemath > Sagemath是一个用于数学运算的工具,包含线性代数、微积分、密码学、组合数学等,现在的Sage基于Python3 > [!NOTE] > > 本次安装环境为刚刚安装好的Xfce桌面 Kali 2024.2 ## 安装必要的库 ```shell sudo apt-get install 4ti2 gpgconf openssh-client default-jdk libavdevice-dev coinor-cbc coinor-libcbc-dev ffmpeg fricas pari-gp2c libigraph-dev libisl-dev libgraphviz-dev libjpeg-dev libnauty-dev lrslib libtbb-dev pandoc pdf2svg libxml-libxslt-perl libxml-writer-perl libxml2-dev libperl-dev libfile-slurp-perl libjson-perl libsvg-perl libterm-readkey-perl libterm-readline-gnu-perl libmongodb-perl libterm-readline-gnu-perl polymake libpolymake-dev r-base-dev r-cran-lattice texlive-latex-extra texlive-xetex latexmk dvipng tex-gyre texlive-fonts-recommended texlive-lang-cyrillic texlive-lang-english texlive-lang-european texlive-lang-french texlive-lang-german texlive-lang-italian texlive-lang-japanese texlive-lang-polish texlive-lang-portuguese texlive-lang-spanish texlive-luatex xindy nano unzip zip curl wget python3 python3-distutils python3-venv tar build-essential ``` ## 下载源码包 导航到自己想要存储的目录下载源码包 ```shell wget https://mirrors.ustc.edu.cn/sagemath/src/sage-10.3.tar.gz tar -xzvf sage-10.3.tar.gz cd sage-10.3 ``` ## 编译安装 时间会非常长,以半个小时为基准,请使用普通用户进行编译 ```shell ./configure make -j4 make install #把sage扔到bin中 sudo ln -s /path/to/sage /usr/bin ``` ## 测试 ```shell sage ``` 取消回复 发表新评论 提交评论