2

Having a problem installing an openssh rpm I hand-rolled today:

[root@local_host ]# rpm -i openssh-6.7p1-1.i386.rpm
error: Failed dependencies:
        libcrypto.so.1.0.0 is needed by openssh-6.7p1-1.i386

Huh? That's strange:

[root@local_host ]# ls -l /lib/libcrypto*
lrwxrwxrwx 1 root root      19 Jan 20 15:18 /lib/libcrypto.so.1.0.0 -> libcrypto.so.1.0.1l
-rwxr-xr-x 1 root root 1815536 Jan 19 04:57 /lib/libcrypto.so.1.0.1l

Dependencies of rpm seem to list same file I have installed:

[root@local_host ]# rpm -qpR openssh-6.7p1-1.i386.rpm
config(openssh) = 6.7p1-1
...
libcrypto.so.1.0.0

I can force the installation and it works - of course, since the required lib is installed - but, what would cause this to have gone all wonky?

I did run ldconfig post-install of my new openssl (also hand-rolled), so the libs should be visible to the system.

Box is CentOS 5.4.

Additional Info

Per @nlu, I checked which package owns the file(s) in question. The file that the ssh rpm wants is actually a symlink to the actual file.

[root@local_host ~]# rpm -qf /lib/libcrypto.so.1.0.0
file /lib/libcrypto.so.1.0.0 is not owned by any package

[root@local_host ~]# rpm -qf /lib/libcrypto.so.1.0.1l
openssl-1.0.1l-1

But it doesn't appear in the rpm:

[root@local_host ~]# rpm -ql openssl-1.0.1l-1
...
/lib/libcrypto.so.1.0.1l
...

So, I did some more work. Figured out how to package up the symlinks in the rpm, also fixed the names to reflect the standard install of openssl and respun the rpm. Installed that without issue. Then, went to install openssh and received exactly the same error!

On the box, I now have:

[root@local_host ]# ls -l /lib/libcrypto*
lrwxrwxrwx 1 root root 27 Jan 21 14:16 /lib/libcrypto.so.1.0.0 -> /usr/lib/libcrypto.so.1.0.0
lrwxrwxrwx 1 root root 27 Jan 21 14:16 /lib/libcrypto.so.6 -> /usr/lib/libcrypto.so.1.0.0

[root@local_host ]# ls -l /usr/lib/libcrypto*
lrwxrwxrwx 1 root root      27 Jan 21 14:16 /usr/lib/libcrypto.so -> /usr/lib/libcrypto.so.1.0.0
-rwxr-xr-x 1 root root 1815536 Jan 21 05:43 /usr/lib/libcrypto.so.1.0.0

[root@local_host ]# rpm -ql openssl-1.0.1l
...
/lib/libcrypto.so.1.0.0
/lib/libcrypto.so.6
/usr/lib/libcrypto.so
/usr/lib/libcrypto.so.1.0.0

Everything should now be in place, I should think? What have I missed?

2

The content of the RPM database and the one of the file system are independent.

To prove that the libcrypto are installed from an RPM, you should check, if the files belongs to the rpm:

rpm -qf /lib/libcrypto.so.1.0.0
rpm -qf /lib/libcrypto.so.1.0.1l

Additionally you can do

rpm -ql {RPM of libcrypto}
0

Aha!

I added:

Provides: libcrypto.so.1.0.0 libssl.so.1.0.0

to the spec file, respun and installed. NOW.... openssh installs without question!

Question now is.... WHY? I don't see a lib or pre-requisite in the openssh.spec file.

Update

Thanks to Mark for putting me onto the requires bits... figured out that I had the AutoReqProv attribute set to No... should have been yes. Works as it should now (don't have to add the Provides line above), thanks!

  • 1
    Without the spec file I'm somewhat guessing but when RPMs are built some Provides: information is automatically added via the find-provides script. The way you hacked in these symlinks isn't working with that script. See rpm.org/max-rpm/s1-rpm-depend-auto-depend.html – Mark Wagner Jan 21 '15 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.