我一步步按照本教程操作:https://learn.microsoft.com/en-us/azure/iot-edge/tutorial-c-module
但是在“构建并推送您的解决方案”(https://learn.microsoft.com/en-us/azure/iot-edge/tutorial-c-module#build-and-push-your-solution)步骤中,我在终端中出现以下错误:
standard_init_linux.go:207: exec user process caused "no such file or directory"
我检查了教程中列出的 3 点(“如果您在尝试构建和推送模块时收到错误”),但错误仍然存在。
我什至不知道它是什么文件..
有人知道这个问题吗?
谢谢
编辑
我添加所有终端输出:
Sending build context to Docker daemon 106kB
Step 1/14 : FROM arm32v7/ubuntu:xenial AS base
---> 8593318db04f
Step 2/14 : RUN apt-get update && apt-get install -y --no-install-recommends software-properties-common && add-apt-repository -y ppa:aziotsdklinux/ppa-azureiot && apt-get update && apt-get install -y azure-iot-sdk-c-dev && rm -rf /var/lib/apt/lists/*
---> Running in 8bed4f396527
standard_init_linux.go:207: exec user process caused "no such file or directory"
The command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends software-properties-common && add-apt-repository -y ppa:aziotsdklinux/ppa-azureiot && apt-get update && apt-get install -y azure-iot-sdk-c-dev && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 1
最佳答案
看起来在中间 docker 镜像中找不到命令中的路径之一。尝试使用以下命令直接在中间镜像上运行 shell:
docker run -it --entrypoint sh 8593318db04f
检查/var/lib/apt/lists/和/bin/sh是否确实存在于图像上。您应该能够手动运行 docker 文件中指定的命令。
我发现这对于调试失败的 docker 构建非常有帮助。
关于Azure物联网边缘模块: Error while Build and Push IoT Edge Solution,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54672249/