前面配置好了 glibc, 但是 Linuxbrew 还需要git2.7 以上版本…
编译安装 git, 又需要 gcc中 C99 的支持, 所以需要先把 C/C++ 编译器搞定了
sudo yum install dh-autoreconf curl-devel expat-devel gettext-devel \
openssl-devel perl-devel zlib-devel --skip-broken
sudo yum install asciidoc xmlto docbook2X
sudo ln -s /usr/bin/db2x_docbook2texi /usr/bin/docbook2x-texi
wget https://github.com/git/git/archive/refs/tags/v2.40.0.zip
unzip v2.40.0.zip
编译: (安装过 gcc-4.9 的前提下)
make configure
./configure --prefix=/usr
make CFLAGS=-std=gnu99 -j2 all doc info
sudo make install install-doc install-html install-info CFLAGS=-std=gnu99
还需要 curl 版本高于 7.41, 首先需要编译安装 OpenSSL …
为什么要用这么老的系统…
开始编译 OpenSSL:(版本不要太高)
wget https://ftp.openssl.org/source/old/1.0.1/openssl-1.0.1u.tar.gz --no-check-certificate
tar xvf xx
cd xx
./config --openssldir=/usr/local/openssl # 为了避免和默认的冲突
make -j2
make test # optional
sudo make install
安装 curl:
How to Build and Install Latest cURL Version CentOS;
libcurl - Install curl with openssl - Stack Overflow; (坑点, 需要指定)
wget https://curl.haxx.se/download/curl-7.80.0.tar.gz --no-check-certificate
tar xvf curl-7.80.0.tar.gz
cd curl-7.80.0
./configure --prefix=/usr/local --with-ssl=/usr/local/openssl/ --disable-shared
make -j2
sudo make install
$ sudo ldconfig
$ curl -V
curl 7.80.0 (x86_64-pc-linux-gnu) libcurl/7.80.0 OpenSSL/1.0.1u zlib/1.2.3
Release-Date: 2021-11-10
Protocols: dict file ftp ftps gopher gophers http https imap imaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS HSTS HTTPS-proxy Largefile libz NTLM NTLM_WB SSL TLS-SRP UnixSockets