2

I would like to install OcsInventory Unix Agent 2.8 on a Solaris 10 machine. When running the perl Makefile.PL command in the directory, it lists the modules which are required by the agent to work properly, like

Please install Net::SSLeay if you want to use the software deployment.  
Please install nmap if you want to use the network discover feature.  
Warning: prerequisite IO::Socket::SSL 0 not found.  
Generating a Unix-style Makefile  
Writing Makefile for Ocsinventory::Unix::Agent  
Writing MYMETA.yml and MYMETA.json

so my job is to resolve these dependencies and make it work. I tried to install the IO::Socket::SSL package after downloading it from metacpan.org, but the perl Makefile.PL command just throws an Out of memory! error. Also tried to install it from the CPAN-shell but ran into the same error just like with the previous version of the package. The computer has 8GB of memory, so it shouldn't be the root of the problem... Could you give any advice how to continue from here?

user312442
  • 21
  • 5
  • Strange. But first, have you successfully installed Net::SSLeay since this is a prerequisite for IO::Socket::SSL? – Steffen Ullrich Feb 25 '21 at 15:12
  • Yes, if I run the `install Net::SSLeay` command in the CPAN shell, it says that it's up to date. (I assume that the OCS installer will realise it later as well...) – user312442 Feb 25 '21 at 15:18
  • And out of memory is the only output you get when running `perl Makefile.PL` from IO::Socket::SSL? – Steffen Ullrich Feb 25 '21 at 15:20
  • No, after pressing Ctrl+C it prints `Bus Error (core dumped)` as well. – user312442 Feb 25 '21 at 15:26
  • 1
    The Makefile.PL does not do much, but it loads already Net::SSLeay. What happens if you do `perl -MNet::SSLeay -e 'printf "%0x %0x %s\n", Net::SSLeay::OPENSSL_VERSION_NUMBER(), Net::SSLeay::SSLeay(), $Net::SSLeay::VERSION'` – Steffen Ullrich Feb 25 '21 at 20:10
  • `Can't load '/usr/perl5/site_perl/5.8.4/sun4-solaris-64int/auto/Net/SSLeay/SSLeay.so' for module Net::SSLeay: ld.so.1: perl: fatal: libssl.so.1.0.0: open failed: No such file or directory at /usr/perl5/5.8.4/lib/sun4-solaris-64int/DynaLoader.pm line 230. at -e line 0 Compilation failed in require. BEGIN failed--compilation aborted. ` So I guess I need to make the libssl.so.1.0.0 library available for it. – user312442 Feb 26 '21 at 08:37
  • 2
    This also means the Net::SSLeay is not actually properly installed – Steffen Ullrich Feb 26 '21 at 11:24

1 Answers1

0

Thanks to Steffen Ullrich I was able to resolve this. Not perfect, but it works. The error message

Can't load '/usr/perl5/site_perl/5.8.4/sun4-solaris-64int/auto/Net/SSLeay/SSLeay.so'  
for module Net::SSLeay: ld.so.1: perl: fatal: libssl.so.1.0.0: open failed:  
No such file or directory at /usr/perl5/5.8.4/lib/sun4-solaris-64int/DynaLoader.pm line 230.  
at -e line 0  
Compilation failed in require.  
BEGIN failed--compilation aborted.

for the command

perl -MNet::SSLeay -e 'printf "%0x %0x %s\n", Net::SSLeay::OPENSSL_VERSION_NUMBER(), Net::SSLeay::SSLeay(), $Net::SSLeay::VERSION'

showed that the libssl.so.1.0.0 library wasn't found so I've run the find ./ -name libssl.so.1.0.0 command to find out where it is on the system.

After that I added the results to the $LD_LIBRARY_PATH:

export LD_LIBRARY_PATH=/usr/sfw/lib:/opt/csw/lib:/opt/csw/lib/sparcv9

When installing now the IO::Socket::SSL package from the CPAN shell it throws an "API-different OpenSSL versions compiled in (0x1000000f) vs linked (0x1000215f) at Makefile.PL line 68." error.

I removed the Net::SSLeay module with cpanminus:

cpanm --uninstall Net::SSLeay

and then reinstalled it from the CPAN shell:

notest install Net::SSLeay

It finsihed succesfully but still threw some interesting messages:

gcc -c  -I"/usr/local/ssl/include" -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TS_ERRNO -O2 -fno-strict-aliasing   -DVERSION=\"1.90\" -DXS_VERSION=\"1.90\" -fPIC "-I/usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE"   SSLeay.c  
SSLeay.xs: In function `bn2sv':  
SSLeay.xs:1765: warning: cast from pointer to integer of different size

After that I tried to install manually an older version of the IO::Socket::SSL package (the 2.020 version instead of the 2.070) and it worked!

user312442
  • 21
  • 5