ubuntu 18 更新git版本到 2.80.1

前言

使用gitlab的时候,发现下面这条语句不能用

shell 复制代码
git init --initial-branch XXX

查看git version

复制代码
git version

下载

shell 复制代码
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.38.1.tar.gz
或者
https://git-scm.com/download/linux
或者去github上面下载
https://github.com/git/git/tags
到这里下最新的
cd git-2.38.1
make prefix=/usr install install-doc install-html install-info

报错

sh 复制代码
# /bin/sh: line 1: asciidoc: command not found
http://sourceforge.net/projects/asciidoc/
cd asciidoc
./configure
sudo make install

# zlib.h: No such file or directory
 sudo apt-get install libz-dev
# git-curl-compat.h:3:10: fatal error: curl/curl.h
 sudo apt-get install libcurl4-openssl-dev

#  openssl/ssl.h:  no such file or directory
 sudo apt-get install libssl-dev
# /bin/sh: 1: xmlto: not found
sudo apt-get  install libxml2-utils
sudo apt-get  install xmlto


#/bin/sh: 1: docbook2x-texi: not found
sudo apt-get install docbook2x

# docbook2texi:/book: no description for directory entry
ln -s /usr/bin/db2x_docbook2texi /usr/bin/docbook2x-texi
ln -s /usr/bin/db2x_docbook2texi /usr/bin/docbook2texi

Ubuntu 14 报错 ./git-compat-util.h:14:2: error: #error "Required C99 support is in a test phase. Please see git-compat-util.h for more details."

#error "Required C99 support is in a test phase. Please see git-compat-util.h for more details."

复制代码
// 生成 configure
make configure
// 打开gnu99
./configure CFLAGS=-std=gnu99
//安装
make prefix=/usr install install-doc install-html install-info
相关推荐
PC2005-cloud7 小时前
Windows 下 WSL2 + Docker Desktop + Ubuntu 开发环境搭建指南
windows·ubuntu·docker
_张一凡7 小时前
Ubuntu 完美安装 FT_SCServo_Debug_Qt 飞特SCS_STS舵机调试工具
linux·ubuntu·舵机调试
ZSTU_呆大鹅7 小时前
VMware 虚拟机 + Ubuntu24.04 的缩略图服务冲突
ubuntu
蛊明7 小时前
一台老 ThinkPad 的系统博物馆:Windows、Ubuntu、UOS、Kylin多系统共存方案
windows·ubuntu·kylin
夫唯不争,故无尤也8 小时前
Ubuntu阿里云服务器一键安装RustDesk指南
服务器·ubuntu·阿里云
晨曦中的暮雨8 小时前
Learn Claude Code:CodeAgent 与后端程序大搭配——定时任务、Git Worktree 和MCP 服务
git·ai·llm·agent
手揽回忆怎么睡9 小时前
Ubuntu 22.04 64位安装MinIO
linux·前端·ubuntu
减瓦9 小时前
用 Git 为本地文件打造一台时光机
开发语言·git·编辑器
Huangjin007_11 小时前
【Linux 系统篇(十一)】基础开发工具(六) —— 版本控制器 Git
linux·运维·git