【问题标题】:Installing Google Cloud SDK, what is the path to the rc file?安装谷歌云SDK,rc文件的路径是什么?
【发布时间】:2017-12-20 11:19:38
【问题描述】:

https://cloud.google.com/sdk/docs/quickstart-mac-os-x

我下载了 tar,然后运行 ​​install.sh

接下来我收到了这条消息,但是我没有看到任何 rc / .rc 文件?

To update your SDK installation to the latest version [162.0.1], run: 
$ gcloud components update


Modify profile to update your $PATH and enable shell command 
completion?

Do you want to continue (Y/n)?  y                    

The Google Cloud SDK installer will now prompt you to update an rc 
file to bring the Google Cloud CLIs into your environment.

Enter a path to an rc file to update, or leave blank to use 
[/Users/leongaban/.zshrc]:  

【问题讨论】:

    标签: google-cloud-platform gcloud google-cloud-sdk


    【解决方案1】:

    Leon,Cloud SDK 安装程序为您提供了一个选项来更新您的 $PATH 以及为 Cloud SDK 中的命令安装 shell 补全。这是通过向您的 shell 启动脚本(通常称为 rc 文件)添加几行来完成的。

    • 由于您选择y 继续执行此步骤,安装程序会询问rc 文件(即shell 启动脚本)的位置。
    • 它检测到您使用zsh,因此它为您提供了更新此文件/Users/leongaban/.zshrc 的默认选项。
    • 如果您使用的是bash,则必须指定类似/Users/leongaban/.bashrc 的内容

    您也可以在上一步中选择n 并手动更新$PATH 和/或shell 补全。

    【讨论】:

    • 啊,是的,我在我的 zsh 配置中看到了它export GOOGLE_SDK_PATH="/Users/leongaban/projects/GoogleSDK"
    猜你喜欢
    • 2021-02-12
    • 2018-11-14
    • 2020-04-10
    • 2018-12-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多