您的位置:首页 > 大数据 > 人工智能

gnutls_handshake() failed问题解决方法

2016-11-09 15:19 633 查看
编译openwrt时候遇到此问题,原因貌似是gnutls的协议不支持,可以安装openssl来解决此问题:

下面是网上找到的解决方法:

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

执行完成后重新编译即可
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐