网站首页 > 编程文章 正文
VMware Workstation已经采用最小化安装CentOS7,显示版本为CentOS7.5,准备采用yum安装git。采用yum list git发现可安装的GIT软件包版本1.8.3.1,新的版本已经是2.19了,因此,我决定编译安装git2.19。 |
由于采用最小化安装系统,编译时出现一些问题,这里对处理过程作一下备忘:
1、首先在git官网上下载最新的版本,下载地址:https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.19.0.tar.gz
2、由于采用win10操作系统下载的文件,需要上传到CentOS7上,操作方式我一般通过SecureCRT采用SSH2协议登录,
上传文件也通过SecureCRT工具中的SFTP协议,具体方法如图:
注意:上传的文件会在登录用户的home目录下,可以通过lpwd查看本地目录,pwd查看远端目录
3、对文件解压:tar xzvf git-2.19.0.tar.gz
4、进入解压后的git目录后,安装方式参考:https://github.com/git/git/blob/master/INSTALL或目录下的INSTALL,这里采用建议步骤:
# make configure ;# as yourself
# ./configure --prefix=/usr ;# as yourself
# make all doc ;# as yourself
# make install install-doc install-html;# as root
5、首先执行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、再次执行make configure,再次出现如下错误:
GIT_VERSION = 2.19.0
GEN configure
/bin/sh: autoconf: 未找到命令
make: *** [configure] 错误 127
通过yum provides autoconf查询到没有安装autoconf,yum -y install autoconf安装包及对应的依赖。
7、再一次执行make configure,正常了,接下来 ./configure很顺利。
8、执行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安装,发现已经安装,zlib.h应该是对应的开发包没有,yum -y install zlib-devel安装开发包
9、再执行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发现包没有安装,yum -y install asciidoc安装该包。
10、再一次执行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发现包没有安装, yum -y install xmlto安装该包,执行make all doc这下很顺利。
11、执行make install install-doc install-html,这下安装很顺利,没有再提示错误。
12、测试一下,执行git --version正常显示:
git version 2.19.0
终于安装成功了,可以正常使用。
猜你喜欢
- 2024-10-10 git秘钥问题解析及gitlab配置(git密钥在哪个文件夹)
- 2024-10-10 PyIDM开源高速引擎Internet下载管理器,搬运工福利
- 2024-10-10 python安装weditor失败, error: subprocess-exited-with-error
- 2024-10-10 自动化测试基础:pycharm如何关联git对GitHub进行代码管理?
- 2024-10-10 git搭建以及使用,搭建github远程仓库
- 2024-10-10 一款运行于windows上的linux命令神器-Cmder(已经爱不释手)
- 2024-10-10 .NetCore+git+IIS+Jenkins的CI/CD
- 2024-10-10 巧妙利用代码托管平台gitee,再也不用担心找不到Java项目
- 2024-10-10 这个40M的小工具助你在windows下处理数据如虎添翼
- 2024-10-10 新手快速上手Git与小乌龟(git小乌龟怎么合并代码)
你 发表评论:
欢迎- 最近发表
-
- 数据不丢失 从Windows 11的DEV版降级到正式版
- Win11学院:在Windows11 25905预览版中如何启用Dev Drive
- DEVC++的卸载(devcon卸载驱动)
- win11 dev 开发版 升级攻略完整版
- 最新Windows11+Windows10系统各种版本永久激活密钥以及下载链接
- 想学Python,却还记不住语法?神仙书籍 python背记手册双手奉上
- 如何用Python语言开发大型服务器程序
- 30天Python 入门到精通(python零基础入门到精通)
- 入门扫盲:9本自学Python PDF书籍,让你避免踩坑,轻松变大神!
- 学好Python需要看的4本书推荐(学python好用的书)
- 标签列表
-
- spire.doc (59)
- system.data.oracleclient (61)
- 按键小精灵源码提取 (66)
- pyqt5designer教程 (65)
- 联想刷bios工具 (66)
- c#源码 (64)
- graphics.h头文件 (62)
- mysqldump下载 (66)
- sqljdbc4.jar下载 (56)
- libmp3lame (60)
- maven3.3.9 (63)
- 二调符号库 (57)
- 苹果ios字体下载 (56)
- git.exe下载 (68)
- diskgenius_winpe (72)
- pythoncrc16 (57)
- solidworks宏文件下载 (59)
- qt帮助文档中文版 (73)
- satacontroller (66)
- hgcad (64)
- bootimg.exe (69)
- android-gif-drawable (62)
- axure9元件库免费下载 (57)
- libmysqlclient.so.18 (58)
- springbootdemo (64)
本文暂时没有评论,来添加一个吧(●'◡'●)