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
相关推荐
半糖112240 分钟前
git配置SSH
git·ssh
YRr YRr3 小时前
在Windows上安装WSL2和Ubuntu 20.04以搭建C++开发环境的详细指南
c++·windows·ubuntu·wsl2
橘色的喵4 小时前
git 如何基于某个分支rebase?
git·rebase
未来可期LJ4 小时前
【Git 操作】Git 的基本操作
git
送你一朵小莲花5 小时前
git merge如何忽略部分路径
git
2401_864476935 小时前
无线领夹麦克风哪个降噪好?一文搞懂麦克风什么牌子的音质效果好
javascript·git·sql·github·mssql
6230_5 小时前
git使用“保姆级”教程2——初始化及工作机制解释
开发语言·前端·笔记·git·html·学习方法·改行学it
沐曦可期6 小时前
Git使用手册
git·学习
认真敲代码的小火龙7 小时前
git入门
git
写bug如流水8 小时前
【Git】Git Commit Angular规范详解
前端·git·angular.js