/bin/sh:应用程序:未找到 [英] /bin/sh: app: not found
问题描述
/ # which chasquid-util
/usr/local/bin/chasquid-util
/ # chasquid-util
/bin/sh: chasquid-util: not found
/ # /usr/local/bin/chasquid-util
/bin/sh: /usr/local/bin/chasquid-util: not found
/ # ls -al /usr/local/bin/
total 27432
drwxr-xr-x 1 root root 4096 Jul 26 16:18 .
drwxr-xr-x 1 root root 4096 Jul 26 16:18 ..
-rwxr-xr-x 1 root root 11721005 Jul 26 16:18 chasquid
-rwxr-xr-x 1 root root 5510494 Jul 26 16:18 chasquid-util
-rwxr-xr-x 1 root root 2910713 Jul 26 16:18 mda-lmtp
-rwxr-xr-x 1 root root 4767277 Jul 26 16:18 smtp-check
-rwxr-xr-x 1 root root 3164845 Jul 26 16:18 spf-check
/ #
推荐答案
鉴于您的上下文,这通常意味着您缺少共享库.对于alpine,通常是glibc,因为它们与libmusl一起提供.您可以使用以下方法进行检查:
Given your context, this typically means you are missing a shared library. With alpine, it's typically glibc since they ship with libmusl. You can check this with:
ldd chasquid-util
我的 DC 2018甲板:
-
您是否运行了预期的命令?(例如
docker run --rm my_image -it echo hello world
将运行命令-it
)
泊坞窗是否正在尝试运行json字符串?(任何json解析错误都会显示为以字符串形式执行json)
Is docker trying to run a json string? (any json paring errors will show up as executing the json as a string)
该文件是否存在...在容器的路径和内部?(不能将主机中的内容放入容器中而不将其构建到映像中或装入卷)
Does the file exist... in the path and inside the container? (can't run stuff from the host inside a container without building it into the image or mounting a volume)
如果它是Shell脚本,请检查第一行(例如#!/bin/bash
)
If it is a shell script, check the first line (e.g. #!/bin/bash
)
在linux shell脚本上检查Windows换行符(使用不同的编辑器查找 ^ M
或 \ r
)
Check for windows linefeeds on linux shell scripts (look for ^M
or \r
with different editors)
如果它是二进制文件,则可能是缺少库(使用 ldd
进行检查)
If it is a binary, there is likely a missing library (use ldd
to check)
这篇关于/bin/sh:应用程序:未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!