tar -zxvf cmake-3.17.2.tar.gz cd cmake-3.17.2 ./bootstrap --prefix=/usr/local/cmake make clean make -j 6 #6为CPU核数,自定义修改,若失败请使用make make test sudo make install 3.2.2 安装make
没有编译器的情况下无法编译安装,使用软件包安装即可,笔者的Debian系,直接使用apt:
sudo apt install make 3.2.3 安装gcc
tar -xvf gcc-9.3.0.tar.xz cd gcc-9.3.0 ./contrib/download_prerequisites mkdir build cd build ../configure --prefix=/usr/local/gcc -enable-checking=release -disable-multilib make clean make -j 6 make test sudo make install sudo ln -sv /usr/local/gcc/include /usr/include/gcc #/etc/ld.so.conf.d/gcc.conf加入以下内容 /usr/local/gcc/lib /usr/local/gcc/lib64 3.2.4 安装openssl
tar -zxvf openssl-1.1.1g.tar.gz cd openssl-1.1.1g ./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl/ssl #prefix为安装位置,默认/usr/local #openssldir为配置文件位置,同时存放证书与密钥对 make clean make -j 6 make test sudo make install sudo ln -sv /usr/local/openssl/include /usr/include/openssl #/etc/ld.so.conf.d/openssl.conf加上以下内容 /usr/local/openssl/lib 3.2.5 下载boost
tar -xvf bison-3.4.tar.xz cd bison-3.4 ./configure --prefix=/usr/local/bison make -j 6 sudo make install #/etc/ld.so.conf.d/bison.conf加入 /usr/local/bison/lib 3.2.8 安装git
tar -xvf git-2.26.2.tar.xz cd git-2.26.2 ./configure --prefix=/usr/local/git / --with-openssl=/usr/local/openssl / --with-libpcre2=/usr/local/pcre2 / --with-curl=/usr/local/curl / --with-expat=/usr/local/expat / --with-iconv=/usr/local/iconv / --with-editor=/usr/bin/vim / --with-zlib=/usr/local/zlib / --with-tcltk=/usr/local/tcl make all doc info sudo make install install-doc install-html install-info 3.2.9 后续处理