$ yum install curl-devel expat-devel gettext-devel \
openssl-devel zlib-devel
$ apt-get install libcurl4-gnutls-dev libexpat1-dev gettext \
libz-dev libssl-dev
What do I do get these libraries on these machines. These machines do not have internet access, I can do a scp if required. Any suggestions.
–
–
sudo apt install openssl libssl-dev
After checking configure file code, I found it is searching for include/openssl/ssl.h
in predefined paths
You can find it on your system and can run configure with --with-openssl
E.g. if you found ssl.h
in /usr/include/openssl/ssl.h
then you can run below command
./configure --with-openssl=/usr/
If you can't access yum, apt-get etc (such as being on a cluster machine with no sudo access), install a new version of openssl locally and manually as follows:
Get the source code, unpack it, enter the directory and make a build directory (very important):
wget https://www.openssl.org/source/openssl-1.0.2r.tar.gz
tar -xvzf openssl-1.0.2r.tar.gz
cd openssl-1.0.2r
mkdir builddir
Configure to your local build destination (make sure its different to your source directory, don't use just /home/yourdir/openssl-1.0.2r/), make and install:
./config --prefix=/home/yourdir/openssl-1.0.2r/builddir --openssldir=/home/yourdir/openssl-1.0.2r/builddir
make install
Add the bin and library paths from the build directory to the appropriate variables in your your shell config file (i.e. ~/.bashrc), and source it:
export PATH=/home/yourdir/openssl-1.0.2r/builddir/bin:$PATH
LD_LIBRARY_PATH="/your/other/dirs/libs:/home/yourdir/openssl-1.0.2r/builddir/lib:"
source ~/.bashrc
OpenSSL should now be in your new directory by default:
which openssl
> /home/yourdir/openssl-1.0.2r/builddir/bin/openssl
Now try and reinstall git, perhaps with make distclean.
If you do not have access to prebuilt packages for the required libraries, you have to resort to the age-old practice from before there were package managers: Build the libraries locally, and the libraries they depend on, and the libraries they depend on, and so on.
In other words, you are in for a potentially large and complex maze of dependency chasing, which might include fixing portability bugs for your platform if the source does not compile out of the box.
Also:
http://packages.qa.debian.org/c/curl.html
http://packages.qa.debian.org/e/expat.html
http://packages.qa.debian.org/g/gettext.html
http://packages.qa.debian.org/z/zlib.html
If you have a package manager locally (on Debian, that would be the basic dpkg
) then you can avoid the finding and compiling morass, and just copy the required hierarchy of depended packages from an Internet-connected host; but again, make sure you get the full set of recursive dependencies (anything that a package you depend on in turn depends on, recursively). E.g. https://packages.debian.org/stable/openssl shows you which packages the openssl
Debian package depends on; some of those will have a similar list of dependencies of their own, in turn.
Since 2013 (year of the question on this page), make sure to use a recent enough version of curl
.
With Git 2.34 (Q4 2021), conditional compilation around versions of libcURL has been straightened out.
See commit 32da6e6, commit e4ff3b6, commit 905a028, commit 2a7f646, commit 7ce3dcd, commit 2d4032c, commit 59a399e (13 Sep 2021), and commit e54e502, commit 5b95244 (11 Sep 2021) by Ævar Arnfjörð Bjarmason (avar
).
(Merged by Junio C Hamano -- gitster
-- in commit 8f79fb6, 23 Sep 2021)
http
: don't hardcode the value of CURL_SOCKOPT_OK
Signed-off-by: Ævar Arnfjörð Bjarmason
Use the new git-curl-compat.h
header to define CURL_SOCKOPT_OK
to its known value if we're on an older curl version that doesn't have it.
It was hardcoded in http.c
in a15d069 ("http
: enable keepalive on TCP sockets", 2013-10-12, Git v1.8.5-rc0 -- merge).
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.