Google compute engine 无法初始化gcloud环境

Google compute engine 无法初始化gcloud环境,google-compute-engine,gcloud,gcloud-cli,google-cloud-sdk,Google Compute Engine,Gcloud,Gcloud Cli,Google Cloud Sdk,我在我的ubuntu 14.4系统上安装了google cloud sdk,但每当我在控制台中键入gcloud init时,我都会收到以下错误:- rbenv:gcloud:未找到命令 此外,如果我使用sudo运行gcloud init,错误将更改为:- /usr/bin/env:ruby1.9.1:没有这样的文件或目录 我无法理解谷歌云sdk与rbenv有什么关系。我尝试重新安装谷歌云sdk,但结果相同。有出路吗?非常感谢您的帮助。听起来好像您的电脑上没有gcloud 如果您将云SDK安装到/

我在我的ubuntu 14.4系统上安装了google cloud sdk,但每当我在控制台中键入gcloud init时,我都会收到以下错误:-

rbenv:gcloud:未找到命令

此外,如果我使用sudo运行gcloud init,错误将更改为:-

/usr/bin/env:ruby1.9.1:没有这样的文件或目录


我无法理解谷歌云sdk与rbenv有什么关系。我尝试重新安装谷歌云sdk,但结果相同。有出路吗?非常感谢您的帮助。

听起来好像您的电脑上没有
gcloud


如果您将云SDK安装到
/home/username/google Cloud SDK/
,您应该能够通过运行
/home/username/google Cloud SDK/bin/gcloud info
来调用
gcloud
。如果您希望能够简单地运行
gcloud
,您可以运行
export PATH=“/home/username/google cloud sdk/bin:$PATH”
(若要保持此设置,请将该命令放入
~/.profile
文件中。

在linux上安装SDK时,它会提示您将以下内容放入~/.bashrc so路径中,并设置为使gcloud等cmd可见。)

# The next line updates PATH for the Google Cloud SDK.
source '/home/scott/google-cloud-sdk/path.bash.inc'

# The next line enables shell command completion for gcloud.
source '/home/scott/google-cloud-sdk/completion.bash.inc'

如果您不在linux/OSX上,那么SDK安装将具有类似的功能

您在哪里安装了Google Cloud SDK?运行
gcloud
是否有效?您为什么认为
rbenv
与此相关?