Bug 1979246 - libkeyutils.so.1: cannot open shared object file: No such file or directory
Summary: libkeyutils.so.1: cannot open shared object file: No such file or directory
Keywords:
Status: NEW
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-05 11:50 UTC by Jevin
Modified: 2024-09-13 13:12 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)
Actual results text file to view the error message. (46.11 KB, text/plain)
2021-07-05 11:50 UTC, Jevin
no flags Details
RHEL9.4 output of virt-customize -v -a vmdisk.qcow2 (72.30 KB, text/plain)
2024-09-13 11:55 UTC, Dariusz Wojewódzki
no flags Details

Description Jevin 2021-07-05 11:50:52 UTC
Created attachment 1798115 [details]
Actual results text file to view the error message.

Description of problem:

I have an Ubuntu 18.04 server with kernel : 4.15.0-143-generic
Running libguestfs-test-tool fails with :

guestfsd: error while loading shared libraries: libkeyutils.so.1: cannot open shared object file: No such file or directory

I am un-able to perform operations with guestfish for my vps disk.


cd /tmp/.guestfs-0/appliance.d (shows following )

# du -sh *
524K initrd
8.1M kernel
530M root

cd /var/tmp/.guestfs-0/appliance.d (shows following)

# du -sh *
524K initrd
8.1M kernel
530M root

replacing the appliance.d from another server helps to make it (then it shows this) work again :

# du -sh *
3.3M initrd
6.4M kernel
4.1G root


Version-Release number of selected component (if applicable):

libguestfs-tools:  Installed: 1:1.36.13-1ubuntu3.3


Actual results:

I have attached Actual results text file.


Expected results:

It should finish with ok.


Additional info:

You can also find more information here : 
https://answers.launchpad.net/ubuntu/+source/libguestfs/+question/697197

Comment 1 Richard W.M. Jones 2021-07-05 12:22:21 UTC
I think there's already an Ubuntu bug about this:
https://bugs.launchpad.net/ubuntu/+source/libguestfs/+bug/1933490

Comment 2 Bato Tsydenov 2022-03-03 01:17:41 UTC
libguestfs does not need the library libkeyutils directly. However, it needs the library libtirpc.so.3:

readelf -d ./guestfsd | grep NEEDED | grep libtirpc

 0x0000000000000001 (NEEDED)             Shared library: [libtirpc.so.3]

That library needs libgssapi_krb5.so.2 which needs libkeyutils library:

readelf -d /usr/lib64/libtirpc.so.3 | grep NEEDED

 0x0000000000000001 (NEEDED)             Shared library: [libgssapi_krb5.so.2]

 0x0000000000000001 (NEEDED)             Shared library: [libkrb5.so.3]

 0x0000000000000001 (NEEDED)             Shared library: [libk5crypto.so.3]

 0x0000000000000001 (NEEDED)             Shared library: [libcom_err.so.2]

 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]

 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]

readelf -d /usr/lib64/libgssapi_krb5.so.2 | grep NEEDED

 0x0000000000000001 (NEEDED)             Shared library: [libkrb5.so.3]

 0x0000000000000001 (NEEDED)             Shared library: [libk5crypto.so.3]

 0x0000000000000001 (NEEDED)             Shared library: [libcom_err.so.2]

 0x0000000000000001 (NEEDED)             Shared library: [libkrb5support.so.0]

 0x0000000000000001 (NEEDED)             Shared library: [libdl.so.2]

 0x0000000000000001 (NEEDED)             Shared library: [libkeyutils.so.1]

 0x0000000000000001 (NEEDED)             Shared library: [libcrypto.so.1.1]

 0x0000000000000001 (NEEDED)             Shared library: [libresolv.so.2]

 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]

So hardlinking both libkeyutils and libgssapi_krb5.so.2 resolved the issue.

I ran the following commands to fix it:

echo '/usr/lib64/libgssapi_krb5.so.2*' > /usr/lib64/guestfs/supermin.d/zz-libgssapi_krb5

echo '/usr/lib64/libkeyutils.so*' > /usr/lib64/guestfs/supermin.d/zz-libkeyutils

Comment 3 Dariusz Wojewódzki 2024-09-13 11:55:09 UTC
Created attachment 2046699 [details]
RHEL9.4 output of virt-customize -v -a vmdisk.qcow2

Comment 4 Dariusz Wojewódzki 2024-09-13 11:56:55 UTC
Hi, I hit this issue on RHEL9.4 while using virt-customize on centos9-stream qcow2 image.
The qcow2 file was generated with https://console.redhat.com/insights/image-builder.

I have included the full output from the command in the attachment.

Comment 5 Richard W.M. Jones 2024-09-13 12:07:10 UTC
That shouldn't be happening in RHEL, please open a support case at
https://issues.redhat.com (product: RHEL component: libguestfs)
Include the output of 'libguestfs-test-tool' in your bug report.

Comment 6 Dariusz Wojewódzki 2024-09-13 13:12:28 UTC
Hi, I managed to sort this out and fix it on RHEL.

In my case the problem was caused by duplicated packages.

On my worksation I had two versions of keyutils and parted installed:

keyutils-libs-1.6.1-4.el9.x86_64
keyutils-libs-1.6.3-1.el9.x86_64

parted-3.4-6.el9.x86_64
parted-3.5-2.el9.x86_64

After:
dnf remove keyutils-libs-1.6.1-4.el9.x86_64
dnf remove parted-3.4-6.el9.x86_64

libguestfs-test-tool stopped reporting errors and I was able to customize my qcow2 image.

Perhaps this will prove to be a clue to someone diagnosing a similar problem.


Note You need to log in before you can comment on or make changes to this bug.