Linux 之GIT 安装(centos6.5)
来源:互联网 发布:ubuntu怎么上传lrzsz包 编辑:程序博客网 时间:2024/04/30 16:45
Linux 下Git安装:
1.下载git的tar包
wget https://github.com/Git/Git/archive/v2.11.0.tar.gz
2.解压
tar -zxvf git-2.11.0.tar.gz
3.进入解压目录
cd git-2.11.0/
4.移除旧版本
yum remove git(没有就不需要执行)
5.make configure
如果报错:/bin/sh: autoconf: command not found:
安装libtool即可:yum install autoconf automake libtool(执行这个命令报错:
rpmdb: Thread/process 4541/140619363587840 failed: Thread died in Berkeley DB library
error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 - (-30974)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:
Error: rpmdb open failed。就需要重建rpm数据库,具体操作请看http://blog.sina.com.cn/s/blog_6fb8aaeb0101aegn.html)
正常会打印:GEN configure
6.配置GIT
./configure –prefix=/usr/local/git –with-iconv –with-curl –with-expat=/usr/local/lib(如果没有安装libiconv请自行安装)
7. make && make install
①如果报错:cache.h:40:18: fatal error: zlib.h: No such file or directory
安装zlib:yum install zlib、yum install zlib-devel
②如果报错:make[1]: * [perl.mak] Error 2
安装:yum install perl-ExtUtils-MakeMaker package
8.添加环境变量
echo “export PATH=$PATH:/usr/local/git/bin” >> /etc/bashrc
9.使环境变量生效
source /etc/bashrc
10.查看git 版本
git –version
- Linux 之GIT 安装(centos6.5)
- centOS6.5 安装Git
- centos6.5 安装git
- Centos6.5安装git
- Centos6.5安装git
- centos6.5 安装git
- centos6.5 安装git
- centos6.5下安装git
- centos6.5 系统安装 git
- centos6.4 linux 下安装git服务器
- Git整合学习之Gitlab安装(Centos6)
- CentOS6.6使用linux git官网最新安装包安装git-2.3.5
- centos6.5安装pomelo(2) 安装git
- linux centos6.5安装tengine(nginx)
- CentOS6.5 x86_64 用 yum 安装 git
- CentOs6.5安装高版本git
- centos6.5 安装Git 及其使用
- Centos6.2 安装git
- Json web token 详解(二)
- 数据结构排序法之堆排序he归并排序
- uva-439 骑士的移动
- 【枚举标记】HDU4907Task schedule【BestCoder Round #3】
- OpenGL 03 绘制命令
- Linux 之GIT 安装(centos6.5)
- 文件上传与下载权限的控制
- 2017.08.06
- tcp头部没有数据长度信息
- LeetCode之Search Insert Position
- this super
- win10管理员已阻止你运行此应用”解决方法
- linux文件系统编程 标准IO
- linux基础知识点复习