Trying to install git on the Unix and Linux machines based on the instructions on Installing Git blog, and it is failing with the below error
make prefix=/u
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.
The Debian PTS has links to upstream projects for many packages, so you might not need to guess which result to pick out of Google results for "openssl source". See e.g. http://packages.qa.debian.org/o/openssl.html (the "Browse source code" link is a good start; the Debian Copyright file for each package should also contain an upstream URL, although it may be historical).
Also:
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.
For RHEL and RHEL-derivatives like CentOS systems, installing will solve this problem.
$ yum install -y openssl-devel
this answer worked just fine for me
https://stackoverflow.com/a/3016986/5837509
just do sudo apt-get install libssl-dev
For ubuntu i installed openssl and libssl-dev
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/
The following fixed compiling python 3.8.1 with ssl
locate ssl.h
/usr/include/openssl/ssl.h
$ pwd
/var/opt/python381/Python-3.8.1
$ ln -s /usr/include/openssl
Result
./configure
~~
checking whether compiling and linking against OpenSSL works... yes
checking for X509_VERIFY_PARAM_set1_host in libssl... yes
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
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.