简体   繁体   English

/ bin / sh:1:gcloud:找不到

[英]/bin/sh: 1: gcloud: not found

I have my NodeJS service running on Cloud App Engine. 我的NodeJS服务正在Cloud App Engine上运行。 From this NodeJS service, I want to execute gcloud command. 通过此NodeJS服务,我想执行gcloud命令。 I am getting the below error and my app engine NodeJS service failed to run the gcloud command. 我收到以下错误,我的应用引擎NodeJS服务无法运行gcloud命令。

/bin/sh: 1: gcloud: not found / bin / sh:1:gcloud:找不到

Connect to your instance and check if you have the gcloud SDK installed in the default runtime image supplied by Google. 连接到您的实例,并检查是否在Google提供的默认运行时映像中安装了gcloud SDK。

If it isn't installed (not impossible - it doesn't appear included in the standard environment either, see System Packages Included in the Node.js Runtime ) then you could try to treat it just like any other non-node.js dependency and build a custom runtime with it - see Google App Engine - specify custom build dependencies 如果未安装(不是不可能的-它也未出现在标准环境中,请参阅Node.js Runtime中包含的系统包 ),那么您可以尝试将其像对待任何其他非node.js依赖项一样对待并使用它构建自定义运行时-请参阅Google App Engine-指定自定义构建依赖项

If it is installed check if you need to tweak your app's environment to access it. 如果已安装,请检查是否需要调整应用程序的环境以访问它。

But in general the gcloud command isn't really designed to be executed on the deployed instances. 但是总的来说, gcloud命令并不是真正为在部署的实例上执行而设计的。 Depending on what exactly you're trying to achieve, there may be better suited/more direct/programmatic API alternatives (which, probably in most cases, is what the gcloud command invokes under the hood as well). 根据您要实现的目标,可能会有更适合/更直接/编程的API替代品(在大多数情况下, gcloud命令也可能调用这些替代品)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM