首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >googlecloudsdk.core.exceptions.RequiresAdminRightsError:您不能执行此操作,因为您没有权限

googlecloudsdk.core.exceptions.RequiresAdminRightsError:您不能执行此操作,因为您没有权限
EN

Stack Overflow用户
提问于 2020-05-30 21:33:39
回答 1查看 158关注 0票数 0

我正在尝试在ubuntu-18.04中安装google-cloud-sdk。我在遵循here的官方文件。当我运行./google-cloud-sdk/install.sh时,我得到以下错误:

代码语言:javascript
复制
Welcome to the Google Cloud SDK!

To help improve the quality of this product, we collect anonymized usage data
and anonymized stacktraces when crashes are encountered; additional information
is available at <https://cloud.google.com/sdk/usage-statistics>. This data is
handled in accordance with our privacy policy
<https://policies.google.com/privacy>. You may choose to opt in this
collection now (by choosing 'Y' at the below prompt), or at any time in the
future by running the following command:

    gcloud config set disable_usage_reporting false

Do you want to help improve the Google Cloud SDK (y/N)?  N

Traceback (most recent call last):
  File "/home/vineet/./google-cloud-sdk/bin/bootstrapping/install.py", line 225, in <module>
    main()
  File "/home/vineet/./google-cloud-sdk/bin/bootstrapping/install.py", line 200, in main
    Prompts(pargs.usage_reporting)
  File "/home/vineet/./google-cloud-sdk/bin/bootstrapping/install.py", line 123, in Prompts
    scope=properties.Scope.INSTALLATION)
  File "/home/vineet/google-cloud-sdk/lib/googlecloudsdk/core/properties.py", line 2406, in PersistProperty
    config.EnsureSDKWriteAccess()
  File "/home/vineet/google-cloud-sdk/lib/googlecloudsdk/core/config.py", line 198, in EnsureSDKWriteAccess
    raise exceptions.RequiresAdminRightsError(sdk_root)
googlecloudsdk.core.exceptions.RequiresAdminRightsError: You cannot perform this action because you do not have permission to modify the Google Cloud SDK installation directory [/home/vineet/google-cloud-sdk].

Re-run the command with sudo: sudo /home/vineet/google-cloud-sdk/bin/gcloud ...

我试着在stackoverflow和github-issues上搜索,但都是徒劳的。

希望您能给我一些提示来解决这个问题。

EN

回答 1

Stack Overflow用户

发布于 2020-06-03 16:32:57

如错误消息中所述。

使用sudo重新运行命令:sudo /home/vineet/google-cloud-sdk/bin/gcloud ...

应使用sudo运行install.sh脚本。

在Ubuntu18.04中安装Google Cloud SDK还有其他选择,就像在documentation上解释的使用apt-get安装包一样。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62103194

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档