首页 > 其他分享 >git升级编译安装

git升级编译安装

时间:2023-01-28 15:33:25浏览次数:54  
标签:bin git configure openssl 升级 编译 usr local

一、删除旧版本git

方法一、

yum remove git -y  (centos环境)

apt-get remove git -y (Ubuntu环境)

 

方法二、 which git 

[root@park2-0007 ~]# which -a git
/usr/bin/git
/bin/git
[root@park2-0007 ~]# mv /usr/bin/git* /tmp/bakgit/

二、下载符合要求的git源码包

下载地址: https://github.com/git/git/tags

三、编译安装git

## 源码包解压缩
tar xf git-2.30.7.tar.gz -C /usr/local/src/
cd /usr/local/src/git-2.30.7
make configure
./configure --prefix=/usr/local/git --with-openssl=/bin/openssl
make
make install
echo  "export PATH=$PATH:/usr/local/git/bin" >> /etc/profile
source /etc/profile

 

 注意:

  make过程中可能出现如下错误,原因是openssl的路径设置不对

 

 所以需要在./configure时指定,默认的openssl的路径时/usr/bin/openssl。

 

标签:bin,git,configure,openssl,升级,编译,usr,local
From: https://www.cnblogs.com/ggborn-001/p/17070389.html

相关文章

  • .gitignore 文件语法介绍
    .gitignore文件的作用AgitignorefilespecifiesintentionallyuntrackedfilesthatGitshouldignore.FilesalreadytrackedbyGitarenotaffected;seethe......
  • 修改Nuget包路径解决grpc编译错误
    今天在写一个程序的时候,准备使用grpc,然而,然而使用自带的示例编译的时候却编译出错,错误提示如下:--grpc_out:protoc-gen-grpc:Thesystemcannotfindthepathspecified......
  • Github加速-设置hosts
    如何提高github的下载速度?第一步:获取github的global.ssl.fastly地址访问:http://github.global.ssl.fastly.net.ipaddress.com/#ipinfo获取cdn和ip域名第二步:获取github......
  • 《HelloGitHub》第 82 期
    兴趣是最好的老师,HelloGitHub让你对编程感兴趣!简介HelloGitHub分享GitHub上有趣、入门级的开源项目。https://github.com/521xueweihan/HelloGitHub这里有实......
  • Git安装与使用
     第一步到这个地址下载相应系统的Git进行安装      ​​https://git-scm.com/download/win​​ 安装很简单,除了下面这里手动选择“usegitfromGitBashonly......
  • Github上传大文件
    1.访问github这里挂了梯子还进不去(可以ping通github但无法访问网页),需要修改hosts,添加以下内容,参考:https://blog.csdn.net/suzhiwei_boke/article/details/1251643282.安装G......
  • 【Gstreamer】GStreamer编译环境搭建
    在Ubuntu环境上安装gstreamerapt安装gstreamersudoapt-getinstalllibgstreamer1.0-devlibgstreamer-plugins-base1.0-devlibgstreamer-plugins-bad1.0-devgstreame......
  • binary_cross_entropy and binary_cross_entropy_with_logits
    importtorchimporttorch.nnasnnimporttorch.nn.functionalasF模拟的输入x变量:4分类问题batch_size,n_classes=10,4x=torch.randn(batch_size,n_classe......
  • GitOps简介
    GitOps这个概念最早是由Kubernetes管理公司Weaveworks公司在2017年提出的,如今已经过去了5个年头,想必大家对这个概念早有耳闻,但你可能并不知道它到底是什么,它和De......
  • 如何在WINDOWS下编译BOOST C++库
    如何在WINDOWS下编译BOOSTC++库cheungmine2008-6-25 写出来,怕自己以后忘记了,也为初学者参考。使用VC8.0和boost1.35.0。 1)下载boost​​​http://www.boost.o......