在OSX 10.9.1上安装Google Cloud SDK时遇到问题 [英] trouble installing Google Cloud SDK on OSX 10.9.1

查看:105
本文介绍了在OSX 10.9.1上安装Google Cloud SDK时遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里有个新手,我尝试按照此处的指南安装GC SDK

Bit of a newbie here, im trying to install GC SDK following the guidelines here

https://developers.google.com/compute/docs/gcutil/

Do you want to update your system path to include the Google Cloud SDK
 (Y/n)?  y

Enter path to a file to append the PATH update to, or leave blank to 
use /Users/lawrencetaur/.bash_profile:  

Do you want to enable command-line completion? (Y/n)?  y

Traceback (most recent call last):
  File "/Users/lawrencetaur/google-cloud-sdk/bin/bootstrapping/install.py", line 293, in     <module>
    bin_path=bootstrapping.BIN_DIR,
  File "/Users/lawrencetaur/google-cloud-sdk/bin/bootstrapping/install.py", line 213, in     UpdatePath
    with open(rc_path, 'w') as rc_file:
IOError: [Errno 13] Permission denied: '/Users/lawrencetaur/.bash_profile'

我只想像debian实例一样使用它 https://developers.google .com/compute/docs/quickstart#servewebpages

All i want is to use it like a debian instance https://developers.google.com/compute/docs/quickstart#servewebpages

推荐答案

最后一行似乎表示权限问题,阻止安装程序写入您的 .bash_profile ,您可以尝试运行SDK具有管理员权限的安装程序,请执行以下操作:

The last line appears to indicate a permissions issue, preventing the setup from writing to your .bash_profile, you could try running the SDK installer with admin privileges, to do this run:

sudo curl https://dl.google.com/dl/cloudsdk/release/install_google_cloud_sdk.bash | bash

当提示您输入密码时,只需输入正常的登录密码即可.

When it prompts you for a password, just enter your normal logon password.

或者,如果您愿意手动编辑 .bash_profile ,则当系统提示您是否要更新系统路径以包括Google Cloud SDK时,可以回答 N ,这很可能使设置顺利完成.然后,您必须手动将Cloud SDK工具添加到系统路径.为此,请使用nano(或其他任何编辑器)编辑文件

Alternatively, if you are comfortable with editing your .bash_profile manually, when you are asked Do you want to update your system path to include the Google Cloud SDK? you could answer N, which will likely allow the setup to complete without error. You would then have to add the Cloud SDK tools to your system path manually. To do this edit the file using nano (or any other editor)

nano $HOME/.bash_profile 

然后在文件底部添加以下行:

Then at the bottom of the file add the line:

export PATH=$HOME/google-cloud-sdk/bin:$PATH

然后通过按 Ctrl + X ,然后按 Y

Then exit and save, by pressing Ctrl + X and then Y

然后,您需要关闭当前的终端窗口,然后打开一个新窗口以使工具可用.

You will then need to close your current terminal window and then open a new one for the tools to become available.

注意:如果您遇到权限错误并且无法保存,则需要先 Ctrl + X ,然后 N 退出nano,然后重新打开,这次使用提升的权限:

Note: If you get a permissions error, and are unable to save, you will need to Ctrl + X, then N to exit nano, then reopen, this time using elevated permissions:

sudo nano $HOME/.bash_profile 

这篇关于在OSX 10.9.1上安装Google Cloud SDK时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆