大网数据广告活动
服务器运维问答

File not found despite showing in ls

· 52CE 我爱测

I'm trying to run a script which exists as visible by ls but when I try to run it, it says "No such file or directory" What gives? root@rx-texas:/home/7days/linux32# root@rx-texas:/home/7days/linux32# ls libstdc++.so.6 steamcmd r…

问题原文

原帖链接 · penu · CC BY-SA 3.0

I'm trying to run a script which exists as visible by ls but when I try to run it, it says "No such file or directory" What gives?

root@rx-texas:/home/7days/linux32#
root@rx-texas:/home/7days/linux32# ls
libstdc++.so.6  steamcmd
root@rx-texas:/home/7days/linux32# ./steamcmd
-bash: ./steamcmd: No such file or directory
root@rx-texas:/home/7days/linux32# less steamcmd
"steamcmd" may be a binary file.  See it anyway?

I'm running 64-bit Debian but the file is linux32 could it be related?

Also here is the output of ls -la:

drwxrwxrwx 2 7days 7days    4096 Apr 22  2013 .
drwxrwxrwx 3 7days 7days    4096 Jan  9 22:44 ..
-rwxrwxrwx 1 7days 7days 3807525 Apr 22  2013 libstdc++.so.6
-rwxrwxrwx 1 7days 7days 5642610 Feb  5  2013 steamcmd

output of ldd steamcmd:

not a dynamic executable

已采纳解答

原帖链接 · techraf · CC BY-SA 3.0

I'm running 64-bit debian but the file is linux32 could it be related?

It's not only related, but is the direct cause of the error.

When you try to run 32-bit executable on a 64-bit system without support for 32-bit runtime installed, this misleading error is displayed. It is not the ./steamcmd that is missing, but its loader.

For a detailed explanation see the answer under Getting "Not found" message when running a 32-bit binary on a 64-bit system on Unix.SE.

The suggested solution for Debian is to install multi-architecture support with:

dpkg --add-architecture i386 && apt-get update

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-01-09)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。