本來想使用tar包進行安裝 但是發現tar包安裝時總是報錯如下:
[root@centos76 git-2.25.0]# make LINK git-imap-send imap-send.o: In function `sk_GENERAL_NAME_num': /usr/local/include/openssl/x509v3.h:166: undefined reference to `OPENSSL_sk_num' imap-send.o: In function `sk_GENERAL_NAME_value': /usr/local/include/openssl/x509v3.h:166: undefined reference to `OPENSSL_sk_value' imap-send.o: In function `sk_GENERAL_NAME_pop_free': /usr/local/include/openssl/x509v3.h:166: undefined reference to `OPENSSL_sk_pop_free' /usr/local/include/openssl/x509v3.h:166: undefined reference to `OPENSSL_sk_pop_free' imap-send.o: In function `ssl_socket_connect': /tfsagent/git-2.25.0/imap-send.c:287: undefined reference to `OPENSSL_init_ssl' /tfsagent/git-2.25.0/imap-send.c:288: undefined reference to `OPENSSL_init_ssl' /tfsagent/git-2.25.0/imap-send.c:290: undefined reference to `TLS_method' /tfsagent/git-2.25.0/imap-send.c:303: undefined reference to `SSL_CTX_set_options' collect2: error: ld returned 1 exit status make: *** [git-imap-send] Error 1
按照segmentfault上面的方法我下載使用 openssl1.1.1b 都不行 還是這個錯誤.最后沒辦法 我從網上找rpm包進行安裝
關鍵字
git rpm
查到解決方案如下:
注意安裝2.24版本之前先 刪除舊版本:
yum remove git
網站信息如下:
https://centos.pkgs.org/7/endpoint-x86_64/git-core-2.24.1-1.ep7.x86_64.rpm.html
Install Howto Download latest endpoint-release rpm from https://packages.endpoint.com/rhel/7/os/x86_64/ Install endpoint-release rpm: # rpm -Uvh endpoint-release*rpm Install git-core rpm package: # yum install git-core
用這個方式就能夠升級了 版本情況如下:
[root@centos76 myagent]# git version git version 2.24.1