git同步遇到报错
git同步遇到报错
“fatal: unable to access ‘https://github.com/ruanwenwu/newp.git/‘: Peer reports incompatible or unsupported protocol version.”
网上很多人说是因为git版本需要升级。我将git版本升级到最新的2.16版本,
git的升级:
CentOS 上的最新git版本也只有1.8.3,就想试着装上最新的版本,没想到差点玩脱,全当记录一次冒险经历
- Development tools 没装的要装上,不然GCC编译时会出错
# yum -y groupinstall Development tools
- GCC 用于编译安装包
# yum install gcc perl-ExtUtils-MakeMaker
- 再卸载CentOS自带的老版本git
# yum -y remove git
下载git并安装
# cd /usr/src
# wget https://www.kernel.org/pub/software/scm/git/git-2.12.0.tar.gz
# tar xzf git-2.12.0.tar.gz
安装注意事项:
# cd git-2.12.0
# make prefix=/usr/local/git all
此时报错
/usr/src/git-2.12.0/utf8.c:463:对‘libiconv’未定义的引用
libgit.a(utf8.o):在函数‘reencode_string_len’中:
/usr/src/git-2.12.0/utf8.c:524:对‘libiconv_open’未定义的引用
/usr/src/git-2.12.0/utf8.c:535:对‘libiconv_close’未定义的引用
/usr/src/git-2.12.0/utf8.c:529:对‘libiconv_open’未定义的引用
collect2: 错误:ld 返回 1
make: *** [git-credential-store] 错误 1
原方案:
# make prefix=/usr/local/git all
# make prefix=/usr/local/git install
解决方案:
可替换为
# ./configure --without-iconv
# make CFLAGS=-liconv prefix=/usr/local/git all
# make CFLAGS=-liconv prefix=/usr/local/git install
最后将git加入环境变量
# echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
# source /etc/bashrc在/etc/profile里加入
export PATH=$PATH:/usr/libexec/git-core
source /etc/profile
[root@iZ25lzba47vZ tp5test]# git --version
git version 2.12.0
问题却依然存在。最后更新了一下nss 问题解决了
最后:
yum update -y nss curl libcurl
问题解决了。
git同步遇到报错的更多相关文章
- git同步遇到报错“fatal: unable to access 'https://github.com/lizhong24/mysite2.git/': Peer reports incompatible or unsupported protocol version.”
git同步遇到报错“fatal: unable to access 'https://github.com/lizhong24/mysite2.git/': Peer reports incompat ...
- 在使用 Git pull 时候报错 error: inflate
在使用 Git pull 时候报错 error: inflate 具体的错误是 这样的 error: inflate: data stream error (unknown compression m ...
- git https 请求报错 504
git https 请求报错 504 原因可能是因为设置了代理,ubuntu/deepin 系统可以检查 /etc/profile ~/.bashrc 内有没有设置 https 的代理. 有的话,去掉 ...
- git切换分支报错:error: pathspec 'origin/XXX' did not match any file(s) known to git
项目上有一个分支test,使用git branch -a看不到该远程分支,直接使用命令git checkout test报错如下: error: pathspec 'origin/test' did ...
- git提交代码报错 trailing whitespace的解决方法
1. git提交代码报错 trailing whitespace 禁止执行pre-commit脚本 进入到项目目录中 chmod a-x .git/hooks/pre-commit 2.git提交代码 ...
- mysql5.7同步复制报错1060故障处理
mysql5.7同步复制报错故障处理 # 报错 1060,具体如下Last_Errno: 1060Last_Error: Coordinator stopped because there were ...
- GG同步sqlserver报错一个案例 Invalid date format
在里面Oracle表同步sqlserver时间,在sqlserver当应用程序数据的结束.您可能会遇到这个错误. 2014-05-17 17:20:24 WARNING OGG-01154 SQL e ...
- Git提交代码报错Git push error:src refspec XXX matches more than one解决方案
Git提交代码push时,报错这个 error: src refspec master matches more than one. error: failed to push some refs t ...
- git statsh命令报错解决
git stash命令主要用于当在一个分支的开发工作未完成,却又要切换到另外一个分支进行开发的时候,除了commit原分支的代码改动的方法外,提供暂存代码的方式. git stash命令参考这篇:ht ...
随机推荐
- PIL库的运用
PIL库学习及运用 1.库的介绍Python Imaging Library,简称PIL python图像处理库,这个库支持多种文件格式,并提供了强大的图像处理和图形处理能力. 下面是我的学习笔记 首 ...
- 利用Delphi编写Socket通信程序
一.Delphi与Socket 计算机网络是由一系列网络通信协议组成的,其中的核心协议是传输层的TCP/IP和UDP协议.TCP是面向连接的,通信双方保持一条通路,好比目前的电话线,使用telnet登 ...
- unity5.6 导出gradle工程,Android Studio 导入问题以及解决
导入后gradle building 一直到跑,卡住了,一般是gradle没有下载,又下不下来的原因. 去 http://services.gradle.org/distributions/ 下载 ...
- element-ui 修改源码实践 --tranfer
1.element-ui 地址:https://github.com/ElemeFE/element 2.修改elelment-ui版本:2.2.2(请选择和项目相对应的版本) 3.修改内容:穿梭框组 ...
- Java 访问限制符 在同一包中或在不同包中:使用类创建对象的权限 & 对象访问成员变量与方法的权限 & 继承的权限 & 深入理解protected权限
一.实例成员与类成员 1. 当类的字节码被加载到内存, 类中类变量.类方法即被分配了相应内存空间.入口地址(所有对象共享). 2. 当该类创建对象后,类中实例变量被分配内存(不同对象的实例变量互不相同 ...
- FORTH 发展(部分)
body, table{font-family: 微软雅黑; font-size: 13.5pt} table{border-collapse: collapse; border: solid gra ...
- JQuery案例二:实现全选、全不选和反选
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- lintcode中等题目的四道题
第一题: 第一句先创建了一个解决问题的类, 第二句声明了一个公共接口的整形链表里面有N个整形数, 第三句给链表动态初始化, 第四步判断链表里的数有没有,如果N<=0则返回结果0,否则执行Prin ...
- DAY2练习-购物车
print('欢迎访问购物车')money = int(input('为方便购物,请输入您的总资产:')) #输入金钱必须为数字类型shopping_price_list = [{"name ...
- windows下启动和运行分布式消息中间件消息队列 kafka
本文转载至:https://www.cnblogs.com/flower1990/p/7466882.html 一.安装JAVA JDK 1.下载安装包 http://www.oracle.com/t ...