yuxiaoyuan0406 / JetsonInstruction

An instraction for coding and other shit on Jetson nano
3 stars 0 forks source link

git clone failed: gnutls_handshake() failed: The TLS connection was non-properly terminated. #3

Closed yuxiaoyuan0406 closed 3 years ago

yuxiaoyuan0406 commented 3 years ago

Rebuild git with libcurl4-openssl-dev instead of gnutls.

sudo apt install build-essential fakeroot dpkg-dev
mkdir ~/git-openssl
cd ~/git-openssl
sudo apt source git
sudo apt build-dep git

This step could fail, bacause the lines of deb_src is commented off in /etc/apt/sources.list.
Un-comment those lines and run sudo apt update to fix this.

Then install libcurl4-openssl-dev.

sudo apt install libcurl4-openssl-dev
sudo dpkg-source -x git_2.17.1-1ubuntu0.9.dsc
cd git_2.17.1

Note: your version might not be the same here.

Then edit file debian/control, replace all libcurl4-gnutls-dev with libcurl4-openssl-dev.
Note: there is only one place to replace on the top.

Now you can build it.

sudo dpkg-buildpackage -rfakeroot -b -us -uc
sudo  dpkg -i  ../git_2.17.1-1ubuntu0.9_arm64.deb -us -uc
yuxiaoyuan0406 commented 3 years ago

Ref:
git报错 failed: The TLS connection was non-properly terminated
How can I properly sign a package I modified and recompiled?