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
相关推荐
MicrosoftCloud2 小时前
用户权限 04|/etc/sudoers 安全配置:从最小授权到「别把 ALL 随便给人」
运维·安全·ubuntu·sudo·sudoers
挖掘狂人13 小时前
Git 从 0 到 1:用一个小项目走完 add / commit / reset / merge / rebase / push
git·后端·github
水饺编程14 小时前
第1章:下载 Linux 0.12 内核
linux·c语言·汇编·ubuntu
codigger14 小时前
Git 三区域模型:把 add、commit、reset、merge 一次讲透
git·github·编程·编程语言
水饺编程14 小时前
第1章:开发环境搭建,在 Windows 中安装 Git
linux·c语言·汇编·git·ubuntu
idanzk14 小时前
Git 推送 GitHub 报 SSL_READ /src refspec main 不匹配 完整踩坑记录
git·github·ssl
星恒随风17 小时前
Linux开发工具详解(二):Git版本控制、GitHub协作与GDB调试实战
linux·笔记·git·学习·github
сокол17 小时前
【Python-基础-环境搭建】Ubuntu Python 开发环境搭建:编译、pipenv、pyenv、远程连接
开发语言·python·ubuntu
刘胡子大叔1 天前
1Panel 部署 ThinkPHP8 踩坑实录
linux·ubuntu
寺中人1 天前
Xshell 完全入门指南:从安装到实战,远程连接+文件传输+会话管理全拆解
git·ssh·github·php·远程连接·xshell·运维工具