Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.12.3 available

The official documentation can be found on https://wiki.ocsinventory-ng.org. Read it before asking your question.

Unable to build Crypt::SSLeay on OSX 10.11

Unable to build Crypt::SSLeay on OSX 10.11 since the OSX Open SSL libraries are now deprecated.

The libraries were included with the command line tools of 10.10 however the below libraries no longer exist as of 10.11 El Capitan.

/usr/include/openssl

aes.h        crypto.h    engine.h    objects.h    rc2.h        stack.h

asn1.h        des.h        err.h        ocsp.h        rc4.h        store.h

asn1_mac.h    des_old.h    evp.h        opensslconf.h    rc5.h        symhacks.h

asn1t.h        dh.h        hmac.h        opensslv.h    ripemd.h    tls1.h

bio.h        dsa.h        krb5_asn.h    ossl_typ.h    rsa.h        tmdiff.h

blowfish.h    dso.h        kssl.h        pem.h        safestack.h    txt_db.h

bn.h        dtls1.h        lhash.h        pem2.h        seed.h        ui.h

buffer.h    e_os2.h        md2.h        pkcs12.h    sha.h        ui_compat.h

cast.h        ebcdic.h    md4.h        pkcs7.h        ssl.h        x509.h

comp.h        ec.h        md5.h        pq_compat.h    ssl2.h        x509_vfy.h

conf.h        ecdh.h        mdc2.h        pqueue.h    ssl23.h        x509v3.h

conf_api.h    ecdsa.h        obj_mac.h    rand.h        ssl3.h

Perhaps it is possible to install the missing libraries using http://brew.sh/  ?
in OCS Inventory NG agent for MacOS X by (550 points)

1 Answer

0 votes

You can supply the missing libraries using the brew tool from http://brew.sh

tsg17751:~ wgalway$ brew install openssl

==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2d_1.el_capitan.bottle.tar.gz

######################################################################## 100.0%

==> Pouring openssl-1.0.2d_1.el_capitan.bottle.tar.gz

==> Caveats

A CA file has been bootstrapped using certificates from the system

keychain. To add additional certificates, place .pem files in

  /usr/local/etc/openssl/certs

 

and run

  /usr/local/opt/openssl/bin/c_rehash

 

This formula is keg-only, which means it was not symlinked into /usr/local.

 

Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries

 

Generally there are no consequences of this for you. If you build your

own software and it requires this formula, you'll need to add to your

build variables:

 

    LDFLAGS:  -L/usr/local/opt/openssl/lib

    CPPFLAGS: -I/usr/local/opt/openssl/include

==> Summary

 /usr/local/Cellar/openssl/1.0.2d_1: 464 files, 17M

by (550 points)
I am still getting errors for Crypt:SSleay in OSX 10.11. I have installed openssl via brew, and added the certificate to /usr/

 

Log:

[Mon Jan 25 13:15:03 2016][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.1.1\
[Mon Jan 25 13:15:03 2016][debug] Log system initialised (File)\
[Mon Jan 25 13:15:03 2016][debug] --scan-homedirs missing. Don't scan user directories\
[Mon Jan 25 13:15:03 2016][debug] Accountinfo file: /var/lib/ocsinventory-agent/https:__<server>.com_ocsinventory/ocsinv.adm\
[Mon Jan 25 13:15:03 2016][debug] OCS Agent initialised\
[Mon Jan 25 13:15:03 2016][debug] Turns hooks on for /etc/ocsinventory-agent/modules.conf\
[Mon Jan 25 13:15:03 2016][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.1.1\
[Mon Jan 25 13:15:03 2016][debug] Log system initialised (File)\
[Mon Jan 25 13:15:03 2016][debug] Calling handlers : `start_handler'\
[Mon Jan 25 13:15:03 2016][debug] [download] Calling download_start_handler\
[Mon Jan 25 13:15:03 2016][debug]  - LWP loaded\
[Mon Jan 25 13:15:03 2016][error] [download] Crypt::SSLeay perl module is missing !!\
[Mon Jan 25 13:15:03 2016][error] [download] Humm my prerequisites are not OK...disabling module :( :(\
[Mon Jan 25 13:15:03 2016][debug] Compress::Zlib is available.\
[Mon Jan 25 13:15:03 2016][debug] Calling handlers : `prolog_writer'\
[Mon Jan 25 13:15:03 2016][debug] sending XML\
[Mon Jan 25 13:15:03 2016][debug] sending: <?xml version="1.0" encoding="UTF-8"?>\
<REQUEST>\
  <DEVICEID>labs-115-2016-01-25-13-02-55</DEVICEID>\
  <QUERY>PROLOG</QUERY>\
</REQUEST>\
[Mon Jan 25 13:15:04 2016][error] Cannot establish communication : 500 Can't connect to <server>.com:443 (SSL connect attempt failed error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed)\
\
}

 

Is there anything more to do after installing openssl via brew?
Hello,

You will need to build the perl modules after downloading the ssl libraries with the brew tool.

Use the lines below to build the perl modules.

You need to supply values to the variables below so CPAN can find the SSL libraries required to build the perl modules. Just paste these commands in and you should be good provided the brew tool did the job.

OPENSSL_INCLUDE=/usr/local/opt/openssl/include

OPENSSL_LIB=/usr/local/opt/openssl/lib PERL_MM_USE_DEFAULT=1 perl -MCPAN -e "install Crypt::SSLeay"

This may be obvious to some but for those whose development system is more restrictive, to get this to work you need to run the above mentioned solution as a single line "sudo" :

$ sudo OPENSSL_INCLUDE=/usr/local/opt/openssl/include OPENSSL_LIB=/usr/local/opt/openssl/lib PERL_MM_USE_DEFAULT=1 perl -MCPAN -e "install Crypt::SSLeay"

Thanks for the tip. It took forever to find this info after getting the cpan install error: 

                   openssl-version.c:2:10: fatal error: 'openssl/opensslv.h' file not found

 

 
Powered by Question2Answer
...