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 cd git-2.17.0/
vim debian/control # replace all libcurl4-gnutls-dev with libcurl4-openssl-dev
vim debian/rules # remove line "TEST =test" otherwise it takes longer to build the package
sudo dpkg-buildpackage -rfakeroot -b -uc -us # add "-uc -us" to avoid error "gpg: No secret key"
sudo dpkg -i ../git_2.17.0-1ubuntu1_amd64.deb
Note 1: I got “OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to proxy” when doing “git clone https://…” after steps above, which turns out to be a problem about git proxy setting. It can be fixed by:
git config --global http.proxy http://proxy.server.com:8080
git config --global https.proxy https://proxy.server.com:8080
Note that it’s better to verify the proxy & port works well first in browsers like Chrome. Reference link: here.
Note 2: I accidentally removed libcurl4-gnutls-dev when trying different approaches, unfortunately, lots of dependent libs are removed as well, including the network manager and GDM3. As a result, the network can’t work any more and the whole display UI was messed up(it switched to lightdm for display manager). I managed to fix the mess with “sudo apt install gdm3”.
So as a lesson learn, don’t remove libcurl4-gnutls-dev for this issue.
Read More:
- Implementation of HTTPS file server based on nginx in win2012
- Linux’s method of clearing DNS cache and refreshing DNS in shell terminal (Ubuntu, Debian)
- LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
- Error: Failed to synchronize cache for repo ‘fedora’
- Solutions to the failure of importing Python 3.7 SSL module
- server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
- Synergy Ubuntu 18 + win7 timed out or new client is unresponsive
- svn Key usage violation in certificate has been detected
- Error 9 at 1 depth lookup:certificate is Not yet valid error
- SSL handshake failed: SSL error: illegal key usage detected in the certificate
- NPM err! Code enotfound (2020-07-03)
- One of the configured repositories failed (Unknown), and yum doesn’t have enough cached data to cont
- Error: unrecognized command line option “-std=c++11”, to solve the problem that ubuntu does not support c++11
- How to disable Network Manager on Linux
- Linux novice: unable to locate package error solution
- error: RPC failed; curl 56 OpenSSL SSL_ read: SSL_ ERROR_ Syscall, errno 10054 solution
- Debian/Ubuntu uses proxy for gpg and apt-key-error resolution: gpg: keyserver receive failed: Connection timed out
- “Failed to load session” Ubuntu “problem solving summary
- Error: no such keg: / usr / local / cellular / node & install NVM & Brew install & oh my Zsh. Git install & git set alias & no bundle URL press
- Huawei cloud Kunpeng server docker installation VIM error