"No such file or directory" error is displayed when executing a file even though it exists in RHEL8 environment

Asked 2 years ago, Updated 2 years ago, 105 views

RHEL8 (x86_64) on Amazon EC2 cannot run with a "No such file or directory" error when trying to run a program (binary file) even though it is definitely present on the file system.

I also checked the shared library with the ldd command, but there seems to be no problem here.

running environment:

$cat/etc/redhat-release
Red Hat Enterprise Linux release 8.6 (Ootpa)

Actual errors, file information, etc.:

$./lmutil-v
-bash:./lmutil: No such file or directory

$ ls-llmutil
-rwxr-xr-x.1ec2-userec2-user1219896 Dec 21 2021 lmutil*

$ file lmutil
lmutil —ELF64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpre/lib64/ld-lsb-x86-64.so.3, for GNU/Linux 2.6.18, stripped

$ ldd lmutil
        linux-vdso.so.1 (0x00007ffef9fe000)
        libpthread.so.0=>/lib64/libpthread.so.0 (0x00007f2a7da7d000)
        libm.so.6=>/lib64/libm.so.6 (0x00007f2a7d6fb000)
        libgcc_s.so.1 =>/lib64/libgcc_s.so.1 (0x00007f2a7d4e3000)
        libc.so.6=>/lib64/libc.so.6 (0x00007f2a7d11e000)
        libdl.so.2=>/lib64/libdl.so.2 (0x00007f2a7cf1a000)
        librt.so.1=>/lib64/librt.so.1 (0x00007f2a7cd12000)
        /lib64/ld-lsb-x86-64.so.3=>/lib64/ld-linux-x86-64.so.2 (0x00007f2a7dc9d000)

linux rhel

2022-09-30 19:25

1 Answers

When I searched Google with the keyword "RHEL8 No such file or directory", the following page was a hit.

No such file or directory?But the file exists!- Ask Ubuntu

The main interaction is mainly with Ubuntu, but one of the answer mentioned the lmutil that I was about to run, and when I searched the rpm package with the keyword "lsb" I found some hits as follows:

$sudodnf search lsb
Last metadata expiration check: 0:44:21 agoon Wed 14 Sep 2022 05:54:35 AM UTC.
================================================================ Name & Summary Matched:lsb================================================================
redhat-lsb-core.x86_64 —LSB Core module support
redhat-lsb-core.i686 - LSB Core module support
redhat-lsb-cxx.x86_64 - LSB CXX module support
redhat-lsb-cxx.i686 - LSB CXX module support
redhat-lsb-desktop.i686 - LSB Desktop module support
redhat-lsb-desktop.x86_64 - LSB Desktop module support
redhat-lsb-languages.i686 - LSB Languages module support
redhat-lsb-languages.x86_64 - LSB Languages module support
redhat-lsb-printing.i686 - LSB Printing module support
redhat-lsb-printing.x86_64 - LSB Printing module support
redhat-lsb-submod-multimedia.x86_64 - LSB Multimedia submodule support
redhat-lsb-submod-multimedia.i686 - LSB Multimedia submodule support
redhat-lsb-submod-security.x86_64 - LSB Security submodule support
redhat-lsb-submod-security.i686 - LSB Security submodule support
===================================================================== Name Matched:lsb=====================================================================
redhat-lsb.x86_64—Implementation of Linux Standard Base specification

This time it was resolved by installing the redhat-lsb-core package.

installing packages:

$sudodnf install redhat-lsb-core

After adding the package, the results are:

$./lmutil-v
Copyright (c) 1989-2020 Flexera. All Rights Reserved.
lmutil v11.17.1.0 build 268393 x64_lsb


2022-09-30 19:25

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.