立即注册
liujin MVP
这个人很懒,什么也没有留下!

高通专有代码git下载报错

通信技术手机智能终端2016-10-17 17:24 阅读 2730 评论 2 热度 2

1,   用git clone 高通专有代码时报错:
gnutls_handshake() failed: A TLS packet with unexpected length was received.
这个问题和openSSL有关,需要重新编译git
在网上找到解决方案如下:(这个链接:http://askubuntu.com/questions/186847/error-gnutls-handshake-failed-when-connecting-to-https-servers)
Got reason of the problem, it was gnutls package. It's working weird behind a proxy. But openssl is working fine even in weak network. So workaround is that we should compile git with openssl. To do this, run the following commands:
sudo apt-get update
sudo apt-get install build-essential fakeroot dpkg-dev libcurl4-openssl-dev
sudo apt-get build-dep git
mkdir ~/git-openssl
cd ~/git-openssl
apt-get source git
dpkg-source -x git_1.7.9.5-1.dsc
cd git-1.7.9.5
(Remember to replace 1.7.9.5 with the actual version of git in your system.)

Then, edit debian/control file (run the command: gksu gedit debian/control) and replace all instances of libcurl4-gnutls-dev with libcurl4-openssl-dev.

Then build the package (if it's failing on test, you can reMOVe the line TEST=test from the file debian/rules):

sudo dpkg-buildpackage -rfakeroot -b
Install new package:

i386:  sudo dpkg -i ../git_1.7.9.5-1_i386.deb
x86_64: sudo dpkg -i ../git_1.7.9.5-1_amd64.deb


2,   另外还有一个问题,网速比较差的时候,curl的postBuffer 默认值较小导致出现如下错误
git clone: error: RPC failed; result=18, HTTP code = 200 解决办法
解决方法:加大curl的postBuffer 默认值大小。
git config --global http.postBuffer 524288000
git config --list
这里把postBuffer设置成500M


路过

鸡蛋

鲜花

握手

雷人

评论2个评论

Mr刘2016-11-15 10:45
专业开发硬件,软件,手机APP,云服务,研发工程师有300多名。希望有合作的机会,联系电话18138298019  刘经理    
回复
wuxiekeji2017-7-11 08:56
看一看,学习
回复
您需要登录后才可以发表言论 登录立即注册
facelist
  • 1587帖子
  • 9关注
  • 46粉丝

访客

粉丝46

关注9

合作/建议

TEL: 19168984579

工作时间:
周一到周五 9:00-11:30 13:30-19:30
  • 扫一扫关注公众号
  • 扫一扫打开小程序
Copyright © 2013-2024 一牛网 版权所有 All Rights Reserved. 帮助中心|隐私声明|联系我们|手机版|粤ICP备13053961号|营业执照|EDI证
搜索
扫一扫添加微信客服
QQ客服返回顶部
返回顶部