barracuda
barracuda

Reputation: 1058

Errno 13 Permission denied when installing gcloud in macOS Mojave 10.14.2

When trying to install gcloud I am getting the following error [Errno 13] Permission denied.

I tried running the install with sudo, running the manual install and nothing.

The following errors where generated when running:

sudo curl https://sdk.cloud.google.com | bash

Error

Error2

Upvotes: 0

Views: 602

Answers (1)

Geno Chen
Geno Chen

Reputation: 5214

sudo curl "$url" | bash will invoke curl with sudo, but the bash, which is in another subshell, is not affected by the previous sudo.

It maybe not necessary to invoke curl with root, but bash seems need root. So just simply move sudo to where needs, for example curl "$url" | sudo bash.

Upvotes: 2

Related Questions