I ran into this same error when trying to follow the Install the latest Cloud Tools version for Ubuntu. My problem was that I assumed Google wanted me to add this command to my .bashrc
instead of just running it in my terminal.
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)"
This means running the next step:
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
Will result in a /etc/apt/sources.list.d/google-cloud-sdk.list
that reads as (note the double space):
deb http://packages.cloud.google.com/apt main
To fix this, just restart your terminal or run source ~/.bashrc
.