lmgrd:没有这样的文件或目录

lmgrd:没有这样的文件或目录

虽然存在类似的问题,但我还没有找到针对这种特定情况的解决方案。我承认这个特定的问题可能只适合我;然而,这个问题仍然存在于一般意义上。仅给定一个二进制文件,如何确定它需要运行哪些库?以下命令正在执行:

chrisheady@linux:~/Dropbox$ uname -a
Linux linux 4.15.0-43-generic #46-Ubuntu SMP Thu Dec 6 14:45:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

有问题的文件是“lmgrd”。当我尝试运行可执行文件时,我得到的是:

chrisheady@linux:~/Dropbox$ ./lmgrd 
bash: ./lmgrd: No such file or directory

我尝试使用一些简单的 Linux 命令进行调试,例如:

chrisheady@linux:~/Dropbox$ ls -la lmgrd
-rwxrwxrwx 1 chrisheady chrisheady 1562496 Mar 1 2018 lmgrd

chrisheady@linux:~/Dropbox$ file lmgrd
lmgrd: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-lsb-x86-64.so.3, for GNU/Linux 2.6.18, stripped

chrisheady@linux:~/Dropbox$ ldd -v lmgrd
linux-vdso.so.1 (0x00007ffc5b779000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f6f03ced000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6f0394f000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f6f03737000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6f03346000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f6f03142000)
/lib64/ld-lsb-x86-64.so.3 => /lib64/ld-linux-x86-64.so.2 (0x00007f6f03f0c000)

Version information:
./lmgrd:
    libdl.so.2 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libdl.so.2
    libpthread.so.0 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libpthread.so.0
    libpthread.so.0 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libpthread.so.0
    libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/libpthread.so.0:
    ld-linux-x86-64.so.2 (GLIBC_2.2.5) => /lib64/ld-linux-x86-64.so.2
    ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
    libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/libm.so.6:
    ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
    libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/libgcc_s.so.1:
    libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/libc.so.6:
    ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
    ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
/lib/x86_64-linux-gnu/libdl.so.2:
    ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
    libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
    libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6

chrisheady@linux:~/Dropbox$ objdump -p lmgrd

    lmgrd:     file format elf64-x86-64

    Program Header:
        PHDR off    0x0000000000000040 vaddr 0x0000000000400040 paddr 0x0000000000400040 align 2**3
             filesz 0x00000000000001c0 memsz 0x00000000000001c0 flags r-x
      INTERP off    0x0000000000000200 vaddr 0x0000000000400200 paddr 0x0000000000400200 align 2**0
             filesz 0x000000000000001a memsz 0x000000000000001a flags r--
        LOAD off    0x0000000000000000 vaddr 0x0000000000400000 paddr 0x0000000000400000 align 2**21
             filesz 0x000000000016fc04 memsz 0x000000000016fc04 flags r-x
        LOAD off    0x0000000000170000 vaddr 0x0000000000770000 paddr 0x0000000000770000 align 2**21
             filesz 0x000000000000c4e9 memsz 0x0000000000019448 flags rw-
     DYNAMIC off    0x00000000001707a8 vaddr 0x00000000007707a8 paddr 0x00000000007707a8 align 2**3
             filesz 0x00000000000001d0 memsz 0x00000000000001d0 flags rw-
        NOTE off    0x000000000000021c vaddr 0x000000000040021c paddr 0x000000000040021c align 2**2
             filesz 0x0000000000000020 memsz 0x0000000000000020 flags r--
    EH_FRAME off    0x00000000001542c0 vaddr 0x00000000005542c0 paddr 0x00000000005542c0 align 2**2
             filesz 0x0000000000005104 memsz 0x0000000000005104 flags r--
       STACK off    0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**3
             filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw-

    Dynamic Section:
      NEEDED               libpthread.so.0
      NEEDED               libm.so.6
      NEEDED               libgcc_s.so.1
      NEEDED               libc.so.6
      NEEDED               libdl.so.2
      INIT                 0x0000000000404470
      FINI                 0x00000000004d5ea4
      HASH                 0x0000000000400240
      STRTAB               0x00000000004020f0
      SYMTAB               0x0000000000400950
      STRSZ                0x0000000000000988
      SYMENT               0x0000000000000018
      DEBUG                0x0000000000000000
      PLTGOT               0x0000000000770b58
      PLTRELSZ             0x0000000000001188
      PLTREL               0x0000000000000007
      JMPREL               0x00000000004032e8
      RELA                 0x0000000000402d00
      RELASZ               0x00000000000005e8
      RELAENT              0x0000000000000018
      VERNEED              0x0000000000402c70
      VERNEEDNUM           0x0000000000000003
      VERSYM               0x0000000000402a78

    Version References:
      required from libdl.so.2:
        0x09691a75 0x00 07 GLIBC_2.2.5
      required from libpthread.so.0:
        0x09691972 0x00 04 GLIBC_2.3.2
        0x09691a75 0x00 03 GLIBC_2.2.5
      required from libc.so.6:
        0x0d696913 0x00 06 GLIBC_2.3
        0x09691974 0x00 05 GLIBC_2.3.4
        0x09691a75 0x00 02 GLIBC_2.2.5

我尝试ln -s /lib64/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3紧随其后,ldconfig -n /lib64但当我执行时lmgrd,我仍然收到相同的错误。

答案1

lmgrd需要存在 LSB(Linux 标准库)才能获取该特定库。安装它,它应该可以工作。 (说,apt install lsb。)

相关内容