---
title: "error: gnutls_handshake() falied when you sync chip code in ubuntu"
author: "allenshao"
date: "2013-11-30T19:47:20Z"
tags: []
categories: ["操作系统"]
slug: "error-gnutls-handshake-falied-when-you-sync-chip-code-in-ubuntu"
draft: false
lastmod: "2013-11-30T19:47:20Z"
id: 1983269
url: "https://allenshao.iteye.com/blog/1983269"
---

gnutls package is broken, workaround is compile git with openssl.


```cmd

sudo apt-get install build-essential fakeroot dpkg-dev
mkdir ~/git-openssl
cd ~/git-openssl
sudo apt-get source git
sudo apt-get build-dep git
sudo apt-get install libcurl4-openssl-dev
sudo dpkg-source -x git_1.8.3.2-1.dsc
cd git-1.8.3.2.

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

```cmd

sudo dpkg-buildpackage -rfakeroot -b
sudo dpkg -i ../git_1.8.3.2-1_amd64.deb

```