fatal: unable to find remote helper for 'https' 编译安装git

1.5 Getting Started - Installing Git

解决办法
yum/dnf安装 curl-devel 依赖包
apt安装 libcurl4-gnutls-dev 依赖包

一、从源代码编译安装 git

If you do want to install Git from source, you need to have the following libraries that Git depends on: autotools, curl, zlib, openssl, expat, and libiconv.

官方文档说了,如果你想编译安装git,你需要有以下依赖库:autotools、curl、zlib、openssl、expat、libiconv

如果你使用的是基于dnf的包管理工具,像Fedora,你可以使用下面的命令安装这些依赖:

$ sudo dnf install dh-autoreconf curl-devel expat-devel gettext-devel openssl-devel perl-devel zlib-devel

如果你使用的是基于Debian的linux,像ubuntu,你可以使用下面的命令安装依赖:

$ sudo apt-get install dh-autoreconf libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev

(可选)如果你还想生成多种格式的文档,你还需要安装下面这些依赖:

# dnf
sudo dnf install asciidoc xmlto docbook2X

# apt
sudo apt-get install asciidoc xmlto docbook2x

If you’re using a Debian-based distribution (Debian/Ubuntu/Ubuntu-derivatives), you also need the install-info package:

如果完全使用的是基于debian的系统,你还需要安装install-info依赖包。

$ sudo apt-get install install-info

If you’re using a RPM-based distribution (Fedora/RHEL/RHEL-derivatives), you also need the getopt package (which is already installed on a Debian-based distro):

如果完全使用的是RPM的发行版,你需要安装getopt依赖包。

$ sudo dnf install getopt

Additionally, if you’re using Fedora/RHEL/RHEL-derivatives, you need to do this:

$ sudo ln -s /usr/bin/db2x_docbook2texi /usr/bin/docbook2x-texi

二、编译安装步骤

当完成这一切,你就可以安装git了:

$ tar -zxf git-2.8.0.tar.gz
$ cd git-2.8.0
$ make configure
$ ./configure --prefix=/usr
$ make all doc info
$ sudo make install install-doc install-html install-info
posted @   那个白熊  阅读(312)  评论(0编辑  收藏  举报
编辑推荐:
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
· 三行代码完成国际化适配,妙~啊~
点击右上角即可分享
微信分享提示