尝试执行 64 位可执行文件时没有该文件或目录(与已解决的 lsb-core 问题无关)

尝试执行 64 位可执行文件时没有该文件或目录(与已解决的 lsb-core 问题无关)
$ file <Binary name>
<Binary name>: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=ad67346bbf303b266c2f08abfb31c9ecfa541cd1, not stripped 

$ arch
x86_64

$ uname -a 
Linux psa1-DL-H61S 4.4.0-75-generic #96~14.04.1-Ubuntu SMP Thu Apr 20 11:06:30 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux 

$ uname -m
x86_64

$ ldd <Binary name>
    linux-vdso.so.1 =>  (0x00007fffdade1000)
    libboost_system.so.1.58.0 => /home/lib/libboost_system.so.1.58.0 (0x00007f1126abc000)
    libCommonAPI.so.3 => /home/lib/libCommonAPI.so.3 (0x00007f112689c000)
    libCommonAPI-DBus.so.3 => /home/lib/libCommonAPI-DBus.so.3 (0x00007f1126594000)
    libjsoncpp.so.0.10.4 => /home/lib/libjsoncpp.so.0.10.4 (0x00007f112635d000)
    libpersistence_client_library.so => /home/lib/libpersistence_client_library.so (0x00007f1126138000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1125efe000)
    libdlt.so.2 => /home/lib/libdlt.so.2 (0x00007f1125cda000)
    libbtcore.so => /home/libbtcore.so (0x00007f11259a8000)
    libstdc++.so.6 => /home/lib/libstdc++.so.6 (0x00007f112569d000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1125397000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f1125180000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1124db8000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1124bb4000)
    libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f112496e000)
    /lib/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x000055eb18b8b000)
    libpersistence-common-object.so => /home/lib/libpersistence-common-object.so (0x00007f1124763000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f112455a000)
    libpal_core.so => /home/lib/libpal_core.so (0x00007f1124327000)
    libtools_common.so => /home/lib/libtools_common.so (0x00007f112407b000)
    libparsercreator.so => /home/lib/libparsercreator.so (0x00007f1123e70000)
    libsac_64.so => /home/lib/libsac_64.so (0x00007f1123c6d000)
    libwicomeconnectionapi.so => /home/lib/libwicomeconnectionapi.so (0x00007f1123a6a000)
    libpersistence-comObj-sqliteDB.so => /home/lib/libpersistence-comObj-sqliteDB.so (0x00007f112385d000)
    libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007f11235a4000)

$ ./<Binary name>
bash: No such file or directory

$bash ./<Binary name>
./<Binary name>: ./<Binary name>: cannot execute binary file

询问 :可执行权限已设置为二进制文件,该二进制文件存在于我尝试执行的目录中。请告诉我们此错误的可能原因是什么

答案1

请注意,执行的两种方式是:

  1. 如果从与二进制文件相同的文件夹执行,请使用:

    ./<binary_file_name>
    
  2. 如果从二进制文件位置之外执行,请使用:

     /path/to/binary/<binary_file_name>
    

相关内容