Linux执行可执行文件提示No such file or directory的解决办法
来源:互联网 发布:医学英文单词软件 编辑:程序博客网 时间:2024/06/16 05:18
Linux执行可执行文件提示No such file or directory的解决方法
最近在使用Linux操作系统执行一个可执行文件,结果出现了No such file or directory的提示,表示很疑惑。
./tshrfbash: ./tshref: No such file or directory
查看文件信息,可以看到文件是存在的,并且是可以执行的。
-rwxr-xr-x 1 yuan yuan 20581 4月 29 2004 tshref
查阅资料后,原因是系统位数与该可执行文件需要的lib库位数不匹配。
用uname命令打印系统信息,发现系统是64位系统
uname -aLinux yuan-vm 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
用file命令查看文件信息,发现是一个32位可执行文件。
file ./tshref./tshref: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped
要想在64位系统上与运行32位程序,则需要安装32位lib库。
对于Ubuntu用户可以使用下面的命令安装。
sudo apt-get install ia32-libsReading package lists... DoneBuilding dependency tree Reading state information... DonePackage ia32-libs is not available, but is referred to by another package.This may mean that the package is missing, has been obsoleted, oris only available from another sourceHowever the following packages replace it: lib32z1 lib32ncurses5 lib32bz2-1.0
过程中有可能找不到需要的库,但是会有几个替代包,选择安装其中一个。
sudo apt-get install lib32bz2-1.0lib32bz2-1.0
然后就可以正常运行之前的可执行文件了。
遇到这种问题其实还有可能是其他原因,例如文本的编码格式问题等,本文仅提出了一种解决方法,读者遇到相同问题要具体问题具体分析
0 0
- Linux执行可执行文件提示No such file or directory的解决办法
- Linux执行可执行文件提示No such file or directory
- 执行可执行文件时,系统提示No such file or directory的解决办法
- Linux执行可执行文件提示No such file or directory的解决方法
- Linux下执行可执行文件提示:No such file or directory的解决方法
- Linux执行可执行文件提示No such file or directory的解决方法
- Linux执行可执行文件提示No such file or directory的解决方法
- 三种关于Linux执行.sh文件,提示No such file or directory错误的解决办法
- linux可执行文件执行时提示No such file or directory(docker环境中运行的ubuntu镜像)
- Linux,执行.sh文件,提示No such file or directory
- Linux,执行.sh文件,提示No such file or directory
- Linux执行脚本却提示No such file or directory
- Linux下执行脚本提示No such file or directory
- Linux下执行脚本提示No such file or directory
- 执行shell脚本时提示bad interpreter:No such file or directory的解决办法
- linux执行python的脚本文件,提示提示No such file or directory
- Linux执行.sh文件,提示No such file or directory的问题的解决方法
- Linux执行.sh文件,提示No such file or directory的问题的解决方法
- HDU 4586
- 使用 CXF 做 webservice 简单例子
- Mysql学习总结(4)——MySql基础知识、存储引擎与常用数据类型
- 单链表反转/逆序
- AndroidStudio插件之GsonFormat
- Linux执行可执行文件提示No such file or directory的解决办法
- Reveal的使用--整理自唐巧的《iOS开发进阶》
- java旅行第三天
- Mysql学习总结(5)——MySql常用函数大全讲解
- uva10269
- android studio menu
- 如何为rsyncd.conf增加一个module
- Nginx 项目部署和配置
- 断言assert()用法