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 ...
随机推荐
- 强力推荐!那些你不能错过的 GitHub 插件和工具
以代码托管平台起家的 GitHub 网站,已然成为全球程序员工作和生活中不可或缺的一份子.从优秀的企业,到优秀的程序员,都将自己最优秀的代码作品存放在这片开源净土里,供彼此学习交流.\\LS--201 ...
- rpm -ivh 安装与 rpm -U安装解决问题一例
[root@localhost server3.10.12]# rpm -ivh krb5-libs-1.15.1-18.el7.x86_64.rpm警告:krb5-libs-1.15.1-18.e ...
- vue-cli webpack配置 简单分析
vue-cli webpack配置分析 入口 从package.json可以看到开发和生产环境的入口. "scripts": { "dev": "no ...
- unity室内外VR漫游
这是一个用Unity 做的VR漫游小场景.
- php遍历数组7种方式(严格说是五种)
数组: $arr = array(1,2,3,4,5); 第一种:foreach (最常见的) foreach ($arr as $v){ echo $v;} 第二种:for for($i=0;$i& ...
- 分享张鑫旭大神的,纯css打字小技巧,我顺便收藏一下
CSS代码: .typing { width: 15em; white-space: nowrap; border-right: 2px solid transparent; animation: t ...
- python中os模块在windows下的使用
今天学习了一下Python的os模块,主要是针对文件夹和文件路径的一系列操作. 与Python内置函数相比这里这里的函数功能更多样化,功能也更强大.但是学习过程中我发现很多函数都是只适用于unix系统 ...
- HIbernate常见异常(转载)
SSH阶段常见的异常系列之一hibernate(15条) 异常一 异常一 异常描述: Sax解析异常:cvc-复杂的类型,发现了以元素maping开头的无效内容,应该是以 ‘{“http://www. ...
- springMVC控制器,处理器,映射器,适配器
前端控制器DispatcherServlet <!--定义spring mvc 的前端控制器Servlet --><servlet> <!--Servlet的名称--&g ...
- rnn应用
Weather Recognition plays an important role in our daily lives and many computer vision applications ...