Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Problem Installing Crypt::SSLeay

by mohan123 (Novice)
on Jul 06, 2006 at 13:00 UTC ( [id://559558]=perlquestion: print w/replies, xml ) Need Help??

mohan123 has asked for the wisdom of the Perl Monks concerning the following question:

Ok I think my previous post is lost,
sorry if this is repeated

I am trying to install Crypt::SSLeay on redhat9 machine
my problem is when i run Makefile.PL it detects openssl installed at /usr and ask me where to link it against.

perl Makefile.PL Found OpenSSL (version OpenSSL 0.9.6) installed at /usr Which OpenSSL build path do you want to link against? [/usr]

To this i tried to give it the path /usr/include/openssl
where my actual openssl folder is located but it returns me this.

Apparently no SSLeay installation at '/usr/include/openssl' Are you sure you got it correct???? ================================================ BUILD INFORMATION ================================================ ssl dir: /usr/include/openssl libraries: -lssl -lcrypto -lgcc -lRSAglue -lrsaref include dir: /usr/include/openssl/include -I/usr/kerberos/include ssl header: openssl/ssl.h ssl candidate: /usr/include/openssl; /usr/include/openssl/include ================================================ Note (probably harmless): No library found for -lgcc Note (probably harmless): No library found for -lRSAglue Note (probably harmless): No library found for -lrsaref Writing Makefile for Crypt::SSLeay

If i proceed with installation module installs but my https requests doen not work.
I learned from reading Makefile.PL that whatever path i supply it searches for
path supplied/include/ssl.h In my case ssl.h file is at /usr/include/openssl/ssl.h so i tried with editing the Makefile.PL and changed it to
path supplied/include/openssl/ssl.h and tried to reinstall though this time it finds SSLeay but doesnt find libraries.

perl Makefile.PL Found OpenSSL (version OpenSSL 0.9.6) installed at /usr Which OpenSSL build path do you want to link against? [/usr] ================================================ BUILD INFORMATION ================================================ ssl dir: /usr libraries: -lssl -lcrypto -lgcc -lRSAglue -lrsaref include dir: /usr/include -I/usr/kerberos/include ssl header: openssl/ssl.h ssl candidate: /usr; /usr/include/openssl; OpenSSL 0.9.6 ================================================ Note (probably harmless): No library found for -lgcc Note (probably harmless): No library found for -lRSAglue Note (probably harmless): No library found for -lrsaref Writing Makefile for Crypt::SSLeay

Also i found this in the README but couldnt understand completely as i dont know much of the linux so i moved on to installation directly .

When installing openssl make sure your config looks like: > ./config --openssldir=/usr/local/openssl or > ./config --openssldir=/usr/local/ssl If you are planning on upgrading the default OpenSSL libraries on a sy +stem like RedHat, not that I would recommend this, then you might try + something like: > ./config --openssldir=/usr --shared The --shared option to config will set up building the .so shared libr +aries which is important for such systems
anyway i tried as directed by moving to /usr/include/openssl and used the command
./config --openssldir=/usr --shared
but it fails like this
 ./config --openssldir=/usr --shared-bash: ./config: No such file or directory

Please help i am totally clueless

Thanks for all those replies .
Somehow i got it working now but it is behaving rather strangely.
In our local network i need to set HTTPS_PROXY='ip:port' then it connects and works fine but if i use the default method of LWP to set proxy it doesn't work.

And also i tried it on another server which is not connected through proxy (doesnt need proxy)then it wont work . but if i set $ENV{HTTPS_PROXY} to a value which our local network uses it works fine.

However the same module is installed on our production server (which also doesnt need proxy)and works fine without any need to set up HTTPS_PROXY variable.
Can someone please explain this behaviour or this is a bug or maybe i have made a mistake

Replies are listed 'Best First'.
Re: Problem Installing Crypt::SSLeay
by Gilimanjaro (Hermit) on Jul 06, 2006 at 15:14 UTC
Re: Problem Installing Crypt::SSLeay
by derby (Abbot) on Jul 06, 2006 at 14:03 UTC

    You should keep the build path as /usr ... by giving it /usr/include/openssl - the build scripts expects both the headers *and* libraries to be under that directory.

    You might also want to install the rpm for Crypt::SSLeay. rpmfind doesn't seem to have it for Redhat 9 (rhn.redhat.com may have it ... but I don't want to register to find out).

    -derby
Re: Problem Installing Crypt::SSLeay
by planetscape (Chancellor) on Jul 06, 2006 at 19:45 UTC

    Just in case the advice you have already received does not help, I note that Super Searching (originally to see if you had mislaid a node) with "install Crypt::SSLeay" turns up many hits... your answer may lay in one of them. :-)

    HTH,

    planetscape
Re: Problem Installing Crypt::SSLeay
by Herkum (Parson) on Jul 06, 2006 at 14:30 UTC

    Another issue I had when installing SSL, the most current version of openssl blew up on my box.

    I ended up compiling a slightly older version of openssl 0.9.7a (feb 2003), to the /usr/local/openssl location, I also made sure that it installed everything under that directory and that I could actually use openssl from the command line before I tried installing Crypt::SSLeay. At that point I was able to get it running.

    It ended up being a harder chore than I expected, but some modules require that bit of extra work.

Re: Problem Installing Crypt::SSLeay
by Khen1950fx (Canon) on Jul 06, 2006 at 20:05 UTC
    I've been using Red Hat since 1999 and Fedora Core since the start. OpenSSL is always a problem because Red Hat has a problem---For example, Fedora Core 5. The libraries are missing because they have not been linked properly. To link properly, you have to use ldconfig, and a lot of the rpms forget to do it. It's so bad that I always avoid rpms if possible and go for the source. What I did with OpenSSL was: ./configure --prefix=(where you want it). I always do --prefix so that at least I know where it is. Second, Perl is usually set up shared---so use --enable-shared. Third, --with-threads---again, Perl is usually threaded on Fedora. Fourth, and most important, --with-gnu-ld. Run make, make check, make install. After make install, (it's absolutely necessary to do this), run /sbin/ldconfig /usr/local/lib. The default location for libs is uasually /usr/local/lib, so I usually put the libs there---but the location depends on what your --prefix= is. If your prefix was --prefix=/usr/bin, then /sbin/ldconfig /usr/bin/lib. If you don't have threads or shared, then leave --enable-shared and --with-threads out. I hope this helps...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://559558]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-04-19 04:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found