I am on a mac and am trying to install the Google Cloud SDK (including the gcloud command line utility) using this command in terminal
curl https://sdk.cloud
Try doing this command on Ubuntu/Linux:
sudo ./google-cloud-sdk/install.sh
Close the terminal or open a new window as the log says:
==> Start a new shell for the changes to take effect.
Once it is done try installing any package by glcloud command:
gcloud components install app-engine-php
It won't show the error.