日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關咨詢
選擇下列產品馬上在線溝通
服務時間:8:30-17:00
你可能遇到了下面的問題
關閉右側工具欄

新聞中心

這里有您想知道的互聯網營銷解決方案
最小化安裝的CentOS7.5上編譯安裝Git2.19

VMware Workstation已經采用最小化安裝centos7,顯示版本為CentOS7.5,準備采用yum安裝git。采用yum list git發(fā)現可安裝的GIT軟件包版本1.8.3.1,新的版本已經是2.19了,因此,我決定編譯安裝git2.19。

由于采用最小化安裝系統(tǒng),編譯時出現一些問題,這里對處理過程作一下備忘:

1、首先在git官網上下載最新的版本,下載地址:https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.19.0.tar.gz

2、由于采用win10操作系統(tǒng)下載的文件,需要上傳到CentOS7上,操作方式我一般通過SecureCRT采用SSH2協(xié)議登錄,

上傳文件也通過SecureCRT工具中的SFTP協(xié)議,具體方法如圖:

注意:上傳的文件會在登錄用戶的home目錄下,可以通過lpwd查看本地目錄,pwd查看遠端目錄

3、對文件解壓:tar  xzvf  git-2.19.0.tar.gz

# make configure ;# as yourself
# ./configure --prefix=/usr ;# as yourself
# make all doc ;# as yourself
# make install install-doc install-html;# as root

5、首先執(zhí)行make configure,開始就出錯了,提示:

configure: Setting lib to 'lib' (the default)
configure: Will try -pthread then -lpthread to enable POSIX Threads.
configure: CHECKS for site configuration
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/opt/git-2.19.0':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

通過yum provides gcc和 yum provides cc查詢到c編譯器沒有安裝,yum -y install gcc安裝gcc包及對應的依賴。

6、再次執(zhí)行make configure,再次出現如下錯誤:

GIT_VERSION = 2.19.0
 GEN configure
/bin/sh: autoconf: 未找到命令
make: *** [configure] 錯誤 127

通過yum provides autoconf查詢到沒有安裝autoconf,yum -y install autoconf安裝包及對應的依賴。

7、再一次執(zhí)行make configure,正常了,接下來 ./configure很順利。

8、執(zhí)行make all doc,又出現錯誤:

* new build flags
 CC credential-store.o
In file included from credential-store.c:1:0:
cache.h:20:18: 致命錯誤:zlib.h:沒有那個文件或目錄
#include
 ^
編譯中斷。
make: *** [credential-store.o] 錯誤 1

錯誤指出沒有zlib,yum -y install zlib安裝,發(fā)現已經安裝,zlib.h應該是對應的開發(fā)包沒有,yum -y install zlib-devel安裝開發(fā)包

9、再執(zhí)行make all doc,再出現錯誤:

/bin/sh:行1: asciidoc: 未找到命令
make[1]: *** [git-init-db.html] 錯誤 127
make[1]: 離開目錄“/opt/git-2.19.0/Documentation”
make: *** [doc] 錯誤 2

沒有asciidoc命令,yum list asciidoc發(fā)現包沒有安裝,yum -y install asciidoc安裝該包。

10、再一次執(zhí)行make all doc,仍出現錯誤:

/bin/sh:行1: xmlto: 未找到命令
make[1]: *** [git-init-db.1] 錯誤 127
make[1]: 離開目錄“/opt/git-2.19.0/Documentation”
make: *** [doc] 錯誤 2

思路一樣,沒有xmlto命令,yum list xmlto發(fā)現包沒有安裝, yum -y install xmlto安裝該包,執(zhí)行make all doc這下很順利。

11、執(zhí)行make install install-doc install-html,這下安裝很順利,沒有再提示錯誤。

12、測試一下,執(zhí)行git --version正常顯示:

git version 2.19.0

終于安裝成功了,可以正常使用。


網站題目:最小化安裝的CentOS7.5上編譯安裝Git2.19
網頁網址:http://www.dlmjj.cn/article/cohgidp.html