php – PowerBI CLI节点:没有这样的文件或目录

我正在尝试为PowerBI构建PHP包装器.我在我的本地安装了PowerBI Cli(https://github.com/Microsoft/PowerBI-Cli),当我在终端上运行任何PowerBI Cli命令时,它运行良好.即使我使用_www用户运行命令它也运行良好(sudo -u _www powerbi config)

但是,当我使用shell_exec或Symphony的Process Component(https://symfony.com/doc/current/components/process.html)通过PHP运行它时,我收到以下异常:

env: node: No such file or directory.

我在Mac Sierra上面临这个问题.使用PHP exec()在Linux上运行良好的命令

最佳答案
试试linking,

"ln -s /path/where/command/is stored/ /to/path/where u want to exec/"

有时程序存储在usr / local / bin / program中,因为默认情况下你在usr / bin / program中执行

然后在shell中使用您设置的新路径.

连接示例假设您有命令路径,

/usr/bin/powerbi然后用上面的命令你可以链接新路径usr / powerbi之后你可以在exec或shell命令中使用新路径.

相关文章

文章浏览阅读8.4k次,点赞8次,收藏7次。SourceCodester Onl...
文章浏览阅读3.4k次,点赞46次,收藏51次。本文为大家介绍在...
文章浏览阅读1.1k次。- php是最优秀, 最原生的模板语言, 替代...
文章浏览阅读1.1k次,点赞18次,收藏15次。整理K8s网络相关笔...
文章浏览阅读1.2k次,点赞22次,收藏19次。此网络模型提供了...
文章浏览阅读1.1k次,点赞14次,收藏19次。当我们谈论网络安...