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 ...
随机推荐
- ELK快速部署及使用~
Elastic Stack 开发人员不能登陆线上服务器查看详细日志 各个系统都有日志,日志数据分散难以查找 日志数据量大,查询速度慢,或者数据不够实时 官网地址:https://www.elastic ...
- 李航《统计学习方法》CH03
CH03 k近邻法 前言 章节目录 k近邻算法 k近邻模型 模型 距离度量 k值选择 分类决策规则 k近邻法的实现: KDTree 构造KDTree 搜索KDTree 导读 kNN是一种基本分类与回归 ...
- Vue.js安装使用教程
一.说明 上大学前,请的都是前端JavaScript.后端ASP/PHP/JSP.前后端代码混杂:上大学时,请的都是前端Jquery.后端SSH.前后端代码分离通过模板关联:大学出来后,请的都是前端三 ...
- css--颜色值
首先,#000000格式的颜色被成为十六进制颜色码: 6位数分为三组,每两位数一组,依次是红.黄.蓝颜色的强度: #000000可以缩写为#000:黑色 其他类推
- 图书馆管理系统(C语言)
/* 实现的功能 * @ 1. 录入图书的信息 * @ 2. 给定图书的编号,显示该图书的详细信息 * @ 3. 给定作者的姓名,可以显示该作者所有的书 * @ 4. 给定出版社,可以显示该出版社出版 ...
- mpvue学习笔记(二)
六.mpvue入门 http://mpvue.com/ 1.安装 $ vue init mpvue/mpvue-quickstart my-project$ cd my-project$ npm in ...
- Exception: 'dlib.mmod_rectangle' object has no attribute 'right' - 例外:'dlib.mmod_rectangle'对象没有属性'right'
I'm using dlib for face detection and getting this error Exception: 'dlib.mmod_rectangle' object has ...
- Java之冒泡排序(升序)
Java之冒泡排序 * 编辑者:鸿灬嗳 * 实现功能: 使用冒泡排序对数组:{25,24,12,76,101,96,28} 排序. */ package test05; public class Bu ...
- 【webpack学习笔记】a04-建立开发环境
开发环境就是在开发过程中为了方便配置的环境,生产环境就是开发完成即将上线的情况. 好了,说了句废话,切入正题. 在开发时,打包后的文件压缩成一团,报错调试的时候傻眼了有木有?每次做出修改需要到浏览器查 ...
- Vue移动端项目总结
使用Vue项目写了一个移动端项目,然后又把项目硬生生的抽离了组件,一直忙着写RN项目没有时间总结心得,今天上午终于下定决心,写点总结. 1.position:absolute: 定位的时候不同手机的浏 ...