Under Construction

Dependent module /opt/freeware/lib/libcrypto.a(libcrypto.so) could not be loaded

After installing YUM, curl does not work (curl is one of the RPM packages from yum_bundle.tar). Trying to start curl leads to the following error message:

aix01 # curl -V
Could not load program curl:
Could not load module /usr/lib/libcurl.a(libcurl.so.4).
Dependent module /opt/freeware/lib/libcrypto.a(libcrypto.so) could not be loaded.
Member libcrypto.so is not found in archive
Could not load module curl.
Dependent module /usr/lib/libcurl.a(libcurl.so.4) could not be loaded.
Could not load module .
aix01 #

The error message “Member libcrypto.so is not found in archive” clearly shows that the shared library libcrypto.so is required, but cannot be found in the archive /opt/freeware/lib/librypto.a. The archive belongs to the installed RPM package openssl:

aix01 # rpm -qf /opt/freeware/lib/libcrypto.a
openssl-1.0.2l-1.ppc
aix01 #

The openssl RPM package is not from the AIX toolbox. All RPMs in the AIX toolbox use OpenSSL provided by AIX, which is installed via a BFF fileset. Ultimately, this means that the RPM package openssl must not be installed when using the AIX toolbox.

The reason why the installed curl accesses the freeware version of OpenSSL and not the AIX version under /usr/lib is the library path in the binary:

aix01 # dump -H /opt/freeware/bin/curl
/opt/freeware/bin/curl:

***Loader Section***
Loader Header Information
VERSION# #SYMtableENT #RELOCent LENidSTR
0x00000001 0x00000067 0x00000572 0x00000067

#IMPfilID OFFidSTR LENstrTBL OFFstrTBL
0x00000004 0x00004b20 0x000002ce 0x00004b87

***Import File Strings***
INDEX PATH BASE MEMBER
0 /opt/freeware/lib:/usr/vac/lib:/usr/lib:/lib
1 libc.a shr.o
2 libcurl.a libcurl.so.4
3 libz.a libz.so.1
aix01 #

When compiling and linking the binary curl, the library path specified was /opt/freeware/lib before /usr/lib. Therefor the freeware version is used if it is available.

We therefore uninstall the RPM package openssl:

aix01 # yum remove openssl
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package openssl.ppc 0:1.0.2l-1 will be erased
--> Processing Dependency: openssl >= 0.9.8 for package: wget-1.14-2.ppc
--> Running transaction check
---> Package wget.ppc 0:1.14-2 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================
Package Arch Version Repository Size
========================================================================================================
Removing:
openssl ppc 1.0.2l-1 installed 72 M
Removing for dependencies:
wget ppc 1.14-2 installed 2.1 M

Transaction Summary
========================================================================================================
Remove 2 Packages

Installed size: 74 M
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : wget-1.14-2.ppc 1/2
install-info: warning: no entries found for `/opt/freeware/info/wget.info.gz'; nothing deleted
Erasing : openssl-1.0.2l-1.ppc 2/2

Removed:
openssl.ppc 0:1.0.2l-1

Dependency Removed:
wget.ppc 0:1.14-2

Complete!
aix01 #

The wget that is also installed, has a dependency on openssl and is therefore also uninstalled. Instead of “yum remove”, “rpm –e” can also be used, but then dependent RPM packages must be specified manually.

Calling curl again shows that the problem has now been resolved:

aix01 # curl -V
curl 7.52.1 (powerpc-ibm-aix6.1.8.0) libcurl/7.52.1 OpenSSL/1.0.2u zlib/1.2.11
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy
aix01 #

If necessary, the RPM package wget can be reinstalled using YUM.