0

I am facing a weird issue with gcloud component installation on WSL (v1) of my windows 10 system.

» 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) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
»

I checked the directories - google-cloud-sdk and google-cloud-sdk.staging - I am the owner on both of them. I even switched to root and executed the command, but ended with the same error.

Any pointer would be appreciated.

Moni
  • 869
  • 3
  • 9
  • 21
  • 2
    1) Why are you hiding the full path? That is a relevant detail. 2) What are the permissions on the failed path? 3) You already have gcloud installed. What was the command used to install that package? There are several methods, you need to continue using the same method to update. – John Hanley Jun 18 '21 at 16:57
  • Adding to John's comment above you can see on this [community answer](https://stackoverflow.com/a/49214863/12857703) that running a gcloud command with sudo might cause this issue. Can you try the proposed on that community answer? – Ralemos Jun 21 '21 at 12:33

1 Answers1

0

Launch the console as Administrator. For some reason, elevating privileges from non-Administrator console does not work.

CadetD
  • 1
  • 1