从网络上下载的Linux单文件程序,无法运行,用File查看出现 ELF 64-bit LSB executable

来源:互联网 发布:3c认证淘宝 编辑:程序博客网 时间:2024/04/28 02:30

1.问题描述如题

2.解决方案

(1)用百度搜索,大部分回答都不知所云。
(2)直到找到这篇文章 运行兼容 Linux Standard Base (LSB)程序的通用解决办法
(3)给出的指令分别为:

$ 文件名
提示:No such file or directory

$ file 文件名
查看文件相关的基本信息
提示:firefly_linux_amd64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, stripped

$ ls -lha 文件名
进行查看权限
提示:-rw-r–r– 1 root root 7.2M 10月 11 14:34 firefly_linux_amd64

$ ldd 文件名
列出动态库的依赖关系(List Dynamic Dependencies)
提示:
linux-vdso.so.1 (0x00007ffdb4f26000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5b9490e000)

(4)其实,到了 $ ls -lha 文件名 这一步,我就已经想起来,这个单文件,是没有给 execute(执行权限)的。

于是我 $ chmod 777 文件名
然后,直接用鼠标,双击打开文件。
——————一切都OK起来。

阅读全文
0 0