【问题标题】:Init service not running in yocto.. pidof not found error初始化服务未在 yocto 中运行.. pidof not found 错误
【发布时间】:2018-10-10 04:13:16
【问题描述】:

我正在尝试在 Yocto 映像中启动时运行服务。我的硬件是 x64,我从元骨架层复制了服务配方。

当我使用此服务刷新最新图像并查看“ps”时,该服务没有运行。

我手动跳转到init.d目录,执行./infusion start命令,出现如下错误:

./infusion: line 192: pidof: not found
ERROR: command pidof not found
Starting infusion ...

如何将 pidof 实用程序添加到我的图像。我正在生成核心图像最小图像。

感谢您的宝贵时间。感谢您的努力..

【问题讨论】:

  • 我在 /bin 文件夹中找到了 pidof 实用程序。运行 pidof 会抛出:"-sh: pidof: not found "

标签: linux embedded-linux yocto pid init


【解决方案1】:

我认为默认路径未设置,因此无法找到它请指定 它在你调用它的脚本中使用绝对路径,例如

/bin/pidof

其他选项是添加

PATH=/bin:/sbin:/usr/sbin:/usr/bin

在您的初始化脚本顶部可能会有所帮助

【讨论】:

  • cd 到 /bin 和 ./pidof 也抛出相同的错误。未找到
  • 你能检查 pidof 二进制文件是否存在于 rootfs 中吗?通常这个二进制文件在 /bin
  • 是的.. 它存在于 /bin 文件夹中
  • 你能检查它是二进制还是shell脚本?
  • 是二进制文件
猜你喜欢
  • 1970-01-01
  • 2018-09-06
  • 1970-01-01
  • 2019-12-09
  • 1970-01-01
  • 2012-12-31
  • 1970-01-01
  • 2021-08-31
  • 1970-01-01
相关资源
最近更新 更多