最近更新于 2022-05-25 18:56

测试环境

Ubuntu 20.04 x86_64

Ubuntu 18.04 arm64 (Jetson Nano)

依赖源码

gmp: https://ftp.gnu.org/gnu/gmp/

mpfr: https://ftp.gnu.org/gnu/mpfr/

mpc: https://ftp.gnu.org/gnu/mpc/

gcc: https://ftp.gnu.org/gnu/gcc/

准备

sudo apt update && sudo apt install build-essential wget

安装 gmp 6.2.1

cd /tmp

wget https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz

tar xvf gmp-6.2.1.tar.xz

cd gmp-6.2.1

./configure

sudo make install -j$(nproc)

安装 mpfr 4.1.0

cd /tmp

wget https://ftp.gnu.org/gnu/mpfr/mpfr-4.1.0.tar.xz

tar xvf mpfr-4.1.0.tar.xz

cd mpfr-4.1.0

./configure

sudo make install -j$(nproc)

安装 mpc 1.2.1

cd /tmp

wget https://ftp.gnu.org/gnu/mpc/mpc-1.2.1.tar.gz

tar xvf mpc-1.2.1.tar.gz

cd mpc-1.2.1

./configure

sudo make install -j$(nproc)

安装 gcc 11.2.0

cd /tmp

wget https://ftp.gnu.org/gnu/gcc/gcc-11.2.0/gcc-11.2.0.tar.xz

tar xvf gcc-11.2.0.tar.xz

cd gcc-11.2.0

./configure

make -j$(nproc)

sudo make install

作者 IYATT-yx