The last line indicates the permission problem that does not allow the settings to be written to .bash_profile , you can try to run the SDK installer with administrator privileges to perform this run:
sudo curl https://dl.google.com/dl/cloudsdk/release/install_google_cloud_sdk.bash | bash
When you are prompted for a password, simply enter your normal password to enter.
Alternatively, if you are comfortable editing your .bash_profile manually when asked . Do you want to update your system path to enable the Google Cloud SDK? . can answer N , which is most likely to allow the installation to complete without errors. Then you will have to manually add the Cloud SDK tools to your system path. To do this, edit the file using nano (or any other editor)
nano /Users/lawrencetaur/.bash_profile
Then at the bottom of the file add the line:
export PATH=/Users/lawrencetaur/google-cloud-sdk/bin:$PATH
Then exit and save by pressing Ctrl + X and then Y
Then you need to close the current terminal window, and then open a new one so that the tools become available.
Note. . If you get a permission error and cannot save, you will need Ctrl + X , then N to exit nano and then reopen, this time using higher permissions:
sudo nano /Users/lawrencetaur/.bash_profile
Iangsy
source share