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
相关推荐
YYRAN_ZZU34 分钟前
Ubuntu22.04搭建QEMU嵌入式开发环境全攻略
linux·嵌入式硬件·ubuntu
secret_to_me2 小时前
buildRoot编译rootfs实战
linux·c语言·c++·ubuntu·电脑·buildroot
_codemonster2 小时前
.git文件夹里所有文件详解
git
很楠爱上2 小时前
TypeScript 核心知识精要
javascript·ubuntu·typescript
dust_and_stars2 小时前
在Ubuntu 24.04上设置Jupyter Notebook远程访问
linux·ubuntu·jupyter
x_lrong3 小时前
Ubuntu下安装配置Claude Code
linux·ubuntu·elasticsearch
济6173 小时前
ROS2 Humble 开发专栏---ROS2 三维视觉应用(1)---RGB-D 相机三维点云数据获取实验---适配Ubuntu 22.04
ubuntu·嵌入式·ros2·机器人开发·机器人方向
01杭呐3 小时前
一次错误分支合并导致 `master` 变脏的排查与修复
git
_codemonster3 小时前
git本地以及github查看历史版本、版本回退
git·github
刘国华-平价IT运维课堂3 小时前
Ubuntu 26.04 LTS 发布,研发与运维需要关注什么?
linux·运维·服务器·人工智能·ubuntu