gcloud update components - permission denied on file ...\kuberun_licenses\LICENSES.txt
Asked Answered
P

7

7

Start udating gcloud:

Your current Cloud SDK version is: 321.0.0
You will be upgraded to version: 322.0.0

┌──────────────────────────────────────────────────┐
│        These components will be updated.         │
├──────────────────────────┬────────────┬──────────┤
│           Name           │  Version   │   Size   │
├──────────────────────────┼────────────┼──────────┤
│ Cloud SDK Core Libraries │ 2021.01.05 │ 16.1 MiB │
│ Kuberun                  │      0.0.1 │ 20.6 MiB │
└──────────────────────────┴────────────┴──────────┘

I get error:

╠═ Uninstalling: Cloud SDK Core Libraries                   ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Uninstalling: Kuberun                                    ═╣
ERROR: (gcloud.components.update) Отказано в доступе: [C:\Users\USER_NAME\AppData\Local\Google\ct4j-cloud-sdk\LATEST\google-cloud-sdk.staging\platform\kuberun_licenses\LICENSES.txt]

Ensure you have the permissions to access the file and that the file is not in use.

Env: Win10

  1. i try from IDEA appEngine Plugin.
  2. try from CMD with admin privilegies. with some error

How to update this ? Maybe you can disable Kuberun ? I use only appengine

Piste answered 10/1, 2021 at 15:24 Comment(0)
F
7

I solved this issue by removing the folder kuberun_licenses from google-cloud-sdk\platform path. Not the one with .staging.

Florescence answered 23/3, 2021 at 15:24 Comment(2)
- this worked for me when I was updating from v 320 to v 351 after few monthsRepresentational
or remove the read-only flagToting
W
1

It looks like this is a known issue: https://status.cloud.google.com/incident/support/21001

Here is the workaround provided at that link:

Please run the following commands in a PowerShell window:

$gcloudDir = Get-Command gcloud | Select -ExpandProperty "Source" | Split-Path | Split-Path
attrib -r "$gcloudDir\platform\kuberun_licenses*.*" /s
attrib -r "$gcloudDir\lib\kuberun*.*" /s
attrib -r "$gcloudDir..\google-cloud-sdk.staging\platform\kuberun_licenses*.*" /s
attrib -r "$gcloudDir..\google-cloud-sdk.staging\lib\kuberun*.*" /s
Remove-Item "$gcloudDir..\google-cloud-sdk.staging" -Recurse

If any of the commands fail, proceed with running the remaining commands.

After running the PowerShell script, run the following in a regular Command Prompt (not PowerShell):

gcloud components update --version 320.0.0

Please note, after applying this workaround, do not run 'gcloud components update' as this will re-trigger the issue. Please wait until the fix is released before updating components.

Winkler answered 14/1, 2021 at 23:16 Comment(2)
The solution is out-dated.Repentant
This worked for me, except there are some missing back slashes. Tried to submit an edit but queue is fullVardhamana
P
0

I find only with full reinstall solution:

  • exit idea
  • rename folder C:\Users\Step\AppData\Local\Google\ct4j-cloud-sdk -> _ct4j-cloud-sdk
  • run idea
  • start gradle -> downloadCloudSDK
  • delete folder _ct4j-cloud-sdk
  • profit
Piste answered 11/1, 2021 at 7:21 Comment(0)
U
0

Here is what I did,

On Win10, I went to

C:\Users{your user name}\AppData\Local\Google

removed dir ct4j-cloud-sdk

And ran:

mvn appengine:deploy

This solved the issue for me

Urbas answered 11/1, 2021 at 19:0 Comment(1)
the trouble is that this needs to be done 2-3 times a week) each update. thanks GooglePiste
T
0

For Eclipse, Exit the Eclipse. Remove the ct4j-cloud-sdk folder from gCloud installed dir. Open the Eclipse and Deploy.

Transship answered 13/1, 2021 at 2:35 Comment(0)
N
0

In a windows file browser, watch file

C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk.staging\platform\kuberun_licenses\LICENSES.txt

during the gcloud components update process. It will disappear then re-appear. When it does, right click on properties and uncheck Read Only then select Ok, then confirm the administrator pop-up. You must do this quickly or have some way of slowing the update script.

Nothing else worked. This does. Good luck.

Newcastle answered 1/12, 2022 at 20:3 Comment(0)
P
-1

New Date. New version. New Google Cloud trouble ... crap...

Your current Cloud SDK version is: 322.0.0
You will be upgraded to version: 323.0.0

|        These components will be updated.         |
+--------------------------+------------+----------+
|           Name           |  Version   |   Size   |
+--------------------------+------------+----------+
| Cloud SDK Core Libraries | 2021.01.08 | 16.1 MiB |
| Kuberun                  |      0.0.1 | 20.6 MiB |
| gcloud cli dependencies  | 2021.01.08 | 10.7 MiB |
+--------------------------+------------+----------+

gcloud crashed (Error): [('C:\\Users\\USER_NAME\\AppData\\Local\\Google\\ct4j-cloud-sdk\\LATEST\\google-cloud-sdk\\platform\\gsutil\\third_party\\funcsigs\\docs\\index.rst', 'C:\\Users\\USER_NAME\\AppData\\Local\\Google\\ct4j-cloud-sdk\\LATEST\\google-cloud-sdk.staging\\platform\\gsutil\\third_party\\funcsigs\\docs\\index.rst', 'symbolic link privilege not held'), ('C:\\Users\\USER_NAME\\AppData\\Local\\Google\\ct4j-cloud-sdk\\LATEST\\google-cloud-sdk\\platform\\gsutil\\third_party\\mock\\docs\\changelog.txt', 'C:\\Users\\USER_NAME\\AppData\\Local\\Google\\ct4j-cloud-sdk\\LATEST\\google-cloud-sdk.staging\\platform\\gsutil\\third_party\\mock\\docs\\changelog.txt', 'symbolic link privilege not held')]

damn the updates, what to do with it, I lose one day a week with them ...

Piste answered 14/1, 2021 at 11:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.