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
相关推荐
特立独行的猫a1 小时前
在 Windows 10 上安装和使用 WSL 2 安装 Ubuntu24详细指南
windows·ubuntu·wsl2
倔强的石头1061 小时前
KaiwuDB社区版 3.1.0 在 Ubuntu 22.04 部署实战:TLS 配置、踩坑复盘与轻量压测
数据库·ubuntu·kwdb
liwenzhuola1 小时前
解决 Ubuntu 上 Qt Creator 项目编译失败的问题
数据库·qt·ubuntu
AiGuoHou12 小时前
Debian/Ubuntu 各个版本一键更换国内镜像源
linux·ubuntu·国内源·debian·镜像源·换源
衡动科技2 小时前
Ubuntu 22.04/24.04 安装 ROS2 完整教程(Humble / Jazzy)
ubuntu·树莓派·ros2
蓝羽天空2 小时前
Ubuntu 24.04 安装 Docker
linux·ubuntu·docker
T0uken2 小时前
WSL:离线配置 Ubuntu 开发环境
linux·运维·ubuntu
�羡阳丶2 小时前
ubuntu22.04+5060显卡双系统安装,各种黑屏踩坑记录
linux·经验分享·ubuntu
b_xinjun11202 小时前
树莓派 Ubuntu 24.04.3 LTS 安装 OpenClaw 操作说明
linux·ubuntu·arcgis
暮秋4742 小时前
ubuntu部署阿里通义千问模型
运维·ubuntu·大模型