← Back to list

[SOLVED] How can I make rpm tell what libraries are provided inside it?

Ted James · 2025-05-09 13:32 · 0 claps · 2.2 min read
#openssl #rpm #rpmbuild #specifications
Open on Medium ↗

How can I make rpm tell what libraries are provided inside it?

Dear stackoverflow users,

I was trying to install newer openssl in CentOS 6.5 as follows:

# curl -O https://www.openssl.org/source/openssl-1.0.1i.tar.gz
# tar xzf openssl-1.0.1i.tar.gz
# sed -i "s@/usr/lib@/usr/lib64@g" openssl-1.0.1i/openssl.spec
# tar czf openssl-1.0.1i.tar.gz openssl-1.0.1i
# rpmbuild -tb openssl-1.0.1i.tar.gz

However installing the generated rpm returns following errors:

bash-4.1# rpm -Uvh /rpmbuild/RPMS/x86_64/openssl-1.0.1i-1.x86_64.rpm

error: Failed dependencies:
    libcrypto.so.10()(64bit) is needed by (installed) python-libs-2.6.6-52.el6.x86_64
    libcrypto.so.10()(64bit) is needed by (installed) libssh2-1.4.2-1.el6.x86_64
    libcrypto.so.10()(64bit) is needed by (installed) fipscheck-1.2.0-7.el6.x86_64
    libcrypto.so.10()(64bit) is needed by (installed) openssh-5.3p1-94.el6.x86_64
    libcrypto.so.10()(64bit) is needed by (installed) openssh-clients-5.3p1-94.el6.x86_64
    libcrypto.so.10()(64bit) is needed by (installed) git-1.7.1-3.el6_4.1.x86_64
    libcrypto.so.10(OPENSSL_1.0.1)(64bit) is needed by (installed) openssh-5.3p1-94.el6.x86_64
    libcrypto.so.10(OPENSSL_1.0.1)(64bit) is needed by (installed) openssh-clients-5.3p1-94.el6.x86_64
    libcrypto.so.10(libcrypto.so.10)(64bit) is needed by (installed) python-libs-2.6.6-52.el6.x86_64
    libcrypto.so.10(libcrypto.so.10)(64bit) is needed by (installed) openssh-5.3p1-94.el6.x86_64
    libcrypto.so.10(libcrypto.so.10)(64bit) is needed by (installed) openssh-clients-5.3p1-94.el6.x86_64
    libssl.so.10()(64bit) is needed by (installed) python-libs-2.6.6-52.el6.x86_64
    libssl.so.10()(64bit) is needed by (installed) libssh2-1.4.2-1.el6.x86_64
    libssl.so.10()(64bit) is needed by (installed) git-1.7.1-3.el6_4.1.x86_64
    libssl.so.10(libssl.so.10)(64bit) is needed by (installed) python-libs-2.6.6-52.el6.x86_64

Thus I modified openssl.spec as follows:

# diff -u .openssl/openssl.spec openssl-1.0.1i/openssl.spec 
--- .openssl/openssl.spec   2014-09-03 06:49:33.621688061 +0000
+++ openssl-1.0.1i/openssl.spec 2014-09-03 06:59:10.949636692 +0000
@@ -103,6 +103,9 @@

 %install
 rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT/usr/lib64
+ln -sf /usr/lib64/libssl.so.1.0.0 $RPM_BUILD_ROOT/usr/lib64/libssl.so.10
+ln -sf /usr/lib64/libcrypto.so.1.0.0 $RPM_BUILD_ROOT/usr/lib64/libcrypto.so.10
 make MANDIR=/usr/man MANSUFFIX=ssl INSTALL_PREFIX="$RPM_BUILD_ROOT" install

 # Make backwards-compatibility symlink to ssleay

Inside the created package libssl.so.10 and libcrypto.so.10 do exist:

# rpm -iqlp /rpmbuild/RPMS/x86_64/openssl-1.0.1i-1.x86_64.rpm | grep \.10
/usr/lib64/libcrypto.so.10
/usr/lib64/libssl.so.10

But it is not recognized as libraries to be provided:

# rpm -qip --provides /rpmbuild/RPMS/x86_64/openssl-1.0.1i-1.x86_64.rpm        
Name        : openssl                      Relocations: (not relocatable)
Version     : 1.0.1i                            Vendor: (none)
Release     : 1                             Build Date: Wed Sep  3 07:06:45 2014
Install Date: (not installed)               Build Host: 4cc54f371b7a
Group       : System Environment/Libraries   Source RPM: openssl-1.0.1i-1.src.rpm
Size        : 3705468                          License: OpenSSL
Signature   : (none)
Packager    : Damien Miller <djm@mindrot.org>
URL         : http://www.openssl.org/
Summary     : Secure Sockets Layer and cryptography libraries and tools
Description :
The OpenSSL Project is a collaborative effort to develop a robust,
commercial-grade, fully featured, and Open Source toolkit implementing the
Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1)
protocols as well as a full-strength general purpose cryptography library.
The project is managed by a worldwide community of volunteers that use the
Internet to communicate, plan, and develop the OpenSSL tookit and its related
documentation.

OpenSSL is based on the excellent SSLeay library developed from Eric A.
Young and Tim J. Hudson.  The OpenSSL toolkit is licensed under an
Apache-style licence, which basically means that you are free to get and
use it for commercial and non-commercial purposes.

This package contains the base OpenSSL cryptography and SSL/TLS
libraries and tools.
SSL  
config(openssl) = 1.0.1i-1
libcrypto.so.1.0.0()(64bit)  
libssl.so.1.0.0()(64bit)  
openssl = 1.0.1i-1
openssl(x86-64) = 1.0.1i-1

modifying LIBCOMPATVERSIONS= to LIBCOMPATVERSIONS=10 in Makefile* does not solve this issue. So the question is, “How can I make rpm tell it has libssl.so.10 and libcrypto.so.10?”

Any comments would be appreciated, thank you.

— mmtsk

Solution

You could use the ‘’Provides: ‘’ tag:

[embed]Manual Dependencies You might have noticed that we've been using the words "requires" and "provides" to describe the dependency…ftp.rpm.org

Answered By — Bruno9779

Answer Checked By — Pedro (FixIt Volunteer)

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0


메타데이터
post_id
0a6746ea9122
slug
solved-how-can-i-make-rpm-tell-what-libraries-are-provided-inside-it-0a6746ea9122
url
https://medium.com/@fixitblog/solved-how-can-i-make-rpm-tell-what-libraries-are-provided-inside-it-0a6746ea9122
canonical_url
https://medium.com/@fixitblog/solved-how-can-i-make-rpm-tell-what-libraries-are-provided-inside-it-0a6746ea9122
author_url
https://medium.com/@fixitblog
status
ok
fetched_at
2026-09-02 17:16:38