@@ -11,7 +11,7 @@ minutes_to_complete: 5
1111author_primary : Jason Andrews
1212multi_install : false
1313multitool_install_part : false
14- official_docs : https://cloud.google.com/sdk/docs/install-sdk
14+ official_docs : https://cloud.google.com/sdk/docs/install-sdk#deb
1515test_images :
1616- ubuntu:latest
1717test_maintenance : false
@@ -44,7 +44,9 @@ aarch64
4444
4545If you see a different result, you are not using an Arm computer running 64-bit Linux.
4646
47- ## How do I download and install for Ubuntu on Arm?
47+ ## How do I download and install gcloud for Ubuntu on Arm?
48+
49+ ### Install gcloud using the package manager
4850
4951The easiest way to install ` gcloud ` for Ubuntu on Arm is to use the package manager.
5052
@@ -62,13 +64,64 @@ curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
6264sudo apt-get update && sudo apt-get install google-cloud-cli -y
6365```
6466
65- Confirm the executable is available.
67+ ### Install gcloud using the archive file
68+
69+ If you cannot use the package manager or you get a Python version error such as the one below you can use the archive file.
70+
71+ ``` output
72+ The following packages have unmet dependencies:
73+ google-cloud-cli : Depends: python3 (< 3.12) but 3.12.3-0ubuntu2 is to be installed
74+ ```
75+
76+ Download the archive file and extract the contents:
77+
78+ ``` bash { target="ubuntu:latest" }
79+ wget https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-linux-arm.tar.gz
80+ sudo tar -xzf google-cloud-cli-linux-arm.tar.gz -C /opt
81+ ```
82+
83+ Run the installer:
84+
85+ ``` bash { target="ubuntu:latest" }
86+ cd /opt/google-cloud-sdk
87+ sudo ./install.sh -q
88+ ```
89+
90+ {{% notice Note %}}
91+ You can change the installation directory from ` /opt ` to a location of your choice.
92+ {{% /notice %}}
93+
94+ Add the installation directory to your search path. The installer will print the path to a script you can source to add ` gcloud ` to your search path.
95+
96+ ``` output
97+ ==> Source [/opt/google-cloud-sdk/completion.bash.inc] in your profile to enable shell command completion for gcloud.
98+ ==> Source [/opt/google-cloud-sdk/path.bash.inc] in your profile to add the Google Cloud SDK command line tools to your $PATH.
99+
100+ For more information on how to get started, please visit:
101+ https://cloud.google.com/sdk/docs/quickstarts
102+ ```
103+
104+ Source the file to include ` gcloud ` in your search path:
105+
106+ ``` bash { target="ubuntu:latest" }
107+ source /opt/google-cloud-sdk/path.bash.inc
108+ ```
109+
110+ Alternatively, you can add the ` bin ` directory to your path by adding the line below to your ` $HOME/.bashrc ` file.
111+
112+ ``` console
113+ export PATH="/opt/google-cloud-sdk/bin:$PATH"
114+ ```
115+
116+ ## Test gcloud
117+
118+ Confirm the executable is available and print the version:
66119
67120``` bash { target="ubuntu:latest" }
68121gcloud -v
69122```
70123
71- The output should be similar to:
124+ The output is similar to:
72125
73126``` output
74127Google Cloud SDK 418.0.0
0 commit comments