CentOS 7.x安装 git 2.x 时,使用编译的方法报错
/usr/bin/ld: warning: libcom_err.so.3, needed by /data01/liuyi/anaconda3/lib/libcurl.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libssl.so.10, needed by //usr/lib64/libssh2.so.1, may conflict with libssl.so.1.1
/usr/bin/ld: imap-send.o: undefined reference to symbol ‘SSL_library_init@@libssl.so.10’
//usr/lib64/libssl.so.10: error adding symbols: DSO missing from command line
collect2: 错误:ld 返回 1
make: *** [git-imap-send] 错误 1
采用第三方源:
curl https://setup.ius.io | sh
yum search git
此时会搜索到很多信息,选择看起来像的那个
比如:
这个222看起来很像
所以
yum remove -y git | yum -y install git222
验证:
git --version
git version 2.22.5
完毕!