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
相关推荐
MuzySuntree几秒前
Ubuntu 下 Maven 构建 Spring Boot 项目报错 release version 17 not supported 解决方案
spring boot·ubuntu·maven
SiYuanFeng12 小时前
新手学Git:如何把本地 Git 项目上传到 GitHub
git·github
闫利朋12 小时前
Ubuntu 24.04 桌面安装向日葵完整指南
linux·运维·ubuntu
前端若水13 小时前
git回退并合并分支操作
git
勤自省14 小时前
《RDK X5 ROS 2 Humble 安装与验证:从零到 Hello World》
windows·ubuntu·ssh·ros2
程序员鱼皮19 小时前
Git WorkTree 是什么?凭什么能让 AI 编程效率翻倍?
git·ai·程序员·编程·ai编程
威迪斯特20 小时前
Ubuntu的apt命令详解:系统管理的核心工具
运维·服务器·ubuntu·apt·下载·包管理·维护
懵逼的小黑子21 小时前
git与远程仓库创建连接
git
前端若水21 小时前
Git 撤销与恢复完全指南(超级详细版)
大数据·git·elasticsearch
golang学习记21 小时前
Git 2.54 来了,这个新命令让我终于敢重写历史了
git·后端