首页 > 解决方案 > gcloud 组件安装错误,Windows 10 WSL 1 上的权限被拒绝,即使在使用 sudo 权限执行后也是如此

问题描述

我在 Windows 10 系统的 WSL (v1) 上安装 gcloud 组件时遇到了一个奇怪的问题。

» sudo gcloud components install beta                                                                                                  
[sudo] password for <user>:


Your current Cloud SDK version is: 345.0.0
Installing components from version: 345.0.0

┌─────────────────────────────────────────────┐
│     These components will be installed.     │
├──────────────────────┬────────────┬─────────┤
│         Name         │  Version   │   Size  │
├──────────────────────┼────────────┼─────────┤
│ gcloud Beta Commands │ 2019.05.17 │ < 1 MiB │
└──────────────────────┴────────────┴─────────┘

For the latest full release notes, please visit:
  https://cloud.google.com/sdk/release_notes

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

╔════════════════════════════════════════════════════════════╗
╠═ Creating update staging area                             ═╣
ERROR: (gcloud.components.install) [Errno 13] Permission denied: '<path>/google-cloud-sdk.staging/.install/.download': [<path>/google-cloud-sdk/.install/.download]

Ensure you have the permissions to access the file and that the file is not in use.
(base) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
»

我检查了目录 - google-cloud-sdk 和 google-cloud-sdk.staging - 我是它们的所有者。我什至切换到 root 并执行了命令,但以同样的错误结束。

任何指针将不胜感激。

标签: gcloudwindows-subsystem-for-linux

解决方案


推荐阅读