“fatal: Unable to find remote helper for ‘http‘”解决办法

问题说明:

Git编译没有难度,只是编译安装后无法使用http,https协议,下载代码报错,git clone http或https的操作就报“fatal: Unable to find remote helper for ‘http’”,网上查了很多方法验证都不行,最后是先编译curl,再编译git解决的,具体编译步骤说明如下:

编译Curl方法:

优先编译curl,代码下载地址:
https://curl.se/download.html
编译配置方法:

./configure --prefix=/usr/local/
–disable-static
–with-openssl
–enable-threaded-resolver
–with-ca-path=/etc/ssl/certs
make 编译

安装方法:

make install &&
rm -rf docs/examples/.deps &&
find docs ( -name Makefile* -o -name *.1 -o -name *.3 ) -exec rm {} ; &&install -v -d -m755 /usr/share/doc/curl-7.78.0 &&
cp -v -R docs/* /usr/share/doc/curl-7.78.0

编译Git方法:

优先编译curl,代码下载地址:
https://mirrors.edge.kernel.org/pub/software/scm/git/
编译配置方法:

./configure --prefix=/usr/local --with-curl --with-expat
make
make install

如果以上安装完还是无法使用,通过git --exec-path、whitc curl查看路径,再修改/etc/profile增加内容如下:
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值