Install Net::SSLeay without root
Want to install Net::SSLeay on a Debian or Ubuntu system that you don't have root on, and doesn't have `libssl-dev` installed? Let me see if I can save you some time...
You are going to need to keep a compiled version of libssl around, and so you need to decide where that will live: I went for: `~/perl5/alien`...
mkdir ~/perl5/alien-src mkdir ~/perl5/aliencd ~/perl5/alien-src
apt-get source lib64z1-dev # Or the 32 bit version
apt-get source libssl-devcd zlib-1.2.3.4.dfsg/ # Or whatever it is
./configure --prefix=~/perl5/alien
make
make installcd ..
cd openssl-1.0.1/ # Or whatever it is
# These options took me approximately 15 years to figure out
./config shared -fPIC --prefix=~/perl5/alien
make
But this doesn't make install cleanly, as it wants to install the `man` pages centrally. I found a way around this by messing around with other flags but ... the `man` pages don't build anyway - ironically enough they throw a POD-related error. So: open up `Makefile`, find the line that looks like this:
install: all install_docs install_sw
And change it to:
install: all install_sw
Now you can:
make install
Change to wherever you have the Net::SSLeay code:
cd .cpanm/latest-build/Net-SSLeay-1.66 OPENSSL_PREFIX=~/perl5/alien/ perl Makefile.POD-related make make test make install
Does the
install
target have any rules of its own? Because if it’s just there to depend onall
andinstall_sw
, you can just saymake all install_sw
yourself instead of editing theMakefile
…