Installing the Datastore Emulator from the Ubuntu Package Repository

Planning and implementing storage and data solutions. Managing storage and data solutions.

You have a developer laptop with the Cloud SDK installed on Ubuntu. The Cloud SDK was installed from the Google Cloud Ubuntu package repository. You want to test your application locally on your laptop with Cloud Datastore. What should you do?

  1. Export Cloud Datastore data using gcloud datastore export.
  2. Create a Cloud Datastore index using gcloud datastore indexes create.
  3. Install the google-cloud-sdk-datastore-emulator component using the apt get install command. Correct Answer
  4. Install the cloud-datastore-emulator component using the gcloud components install command.
Answer Correct answer: C — install the google-cloud-sdk-datastore-emulator component with apt-get, because the apt-based Cloud SDK disables the gcloud component manager.

Community Insight

This question tests whether you know that an apt-installed Cloud SDK disables the gcloud components manager, so the common trap is reflexively running 'gcloud components install cloud-datastore-emulator', which fails on this installation type.

When the Google Cloud SDK is installed on Ubuntu from the official apt repository, the built-in Component Manager is disabled, so extras such as the Cloud Datastore emulator must be added through apt. The page confirms that the correct action is installing the google-cloud-sdk-datastore-emulator package with apt-get, enabling local Datastore testing on the developer laptop.

Option D (gcloud components install cloud-datastore-emulator) is the popular wrong pick: it is the standard command for tarball or bundled installs, but on an apt-based install gcloud returns an error stating the component manager is disabled and tells you to use the package manager instead.

Community Discussion (163 comments)

andystefano 👍 1 Selected: C
C) La pista en preguntas del Associate Cloud Engineer suele ser: • "Installed from the Google Cloud Ubuntu package repository" → usa apt-get • "Installed using the Google Cloud SDK installer" → usa gcloud components install
Vismaya 👍 1 Selected: D
gcloud components install is the correct one
AdelElagawany 👍 1 Selected: C
The correct Answer is C I managed to reproduce it as below: - When using : gcloud components install cloud-datastore-emulator, I got the below error: ERROR: (gcloud.components.install) You cannot perform this action because the Google Cloud CLI component manager is disabled for this installation. You can run the following command to achieve the same result for this installation: apt-get install google-cloud-cli-datastore-emulator - When using: sudo apt-get install google-cloud-sdk-datastore-emulator, It works.
RushinthJohn 👍 1 Selected: D
You can't directly install the Datastore emulator with apt-get install google-cloud-sdk-datastore-emulator. The Datastore emulator is a component of the Google Cloud SDK (gcloud CLI), and it's installed using the gcloud components install command.
yodaforce 👍 1 Selected: C
Explanation: Since you installed the Cloud SDK from the Google Cloud Ubuntu package repository, you should also install additional components (like the Cloud Datastore emulator) using the same package manager (apt-get) rather than gcloud components install. To install the Datastore emulator, run: sudo apt-get install google-cloud-sdk-datastore-emulator Why Not the Others? A. gcloud datastore export → Exports data but does not install the emulator. B. gcloud datastore indexes create → Creates Datastore indexes but does not provide local testing. D. gcloud components install cloud-datastore-emulator → This command only works if you installed the SDK via the tarball or ZIP method. However, since your installation is from the Google Cloud Ubuntu package repository, you must use apt-get instead.
peddyua 👍 1 Selected: C
works: apt-get install google-cloud-sdk-datastore-emulator
09bd94b 👍 1 Selected: C
It is installed using the same procedure as the Cloud SDK
juankloyd 👍 1 Selected: C
C for me.
deskj 👍 1
C is correct because the datastore emulator is installed using apt and not gcloud. D is incorrect because the "cloud-datastore-emulator" component is a legacy component and is not recommended for use. The correct component to install is "google-cloud-sdk-datastore-emulator". https://cloud.google.com/datastore/docs/tools/datastore-emulator
Timfdklfajlksdjlakf 👍 2 Selected: C
The correct answer is C. Don't mix your Ubuntu CLI with Gcloud. How is it supposed to work. It's either or. Not mixed.
wojanx77 👍 2 Selected: C
Looks like it may be "C" as there is an error when I try to install emulator by gcloud command. === gcloud components install cloud-datastore-emulator ERROR: (gcloud.components.install) You cannot perform this action because the Google Cloud CLI component manager is disabled for this installation. You can run the following command to achieve the same result for this installation: sudo apt-get install google-cloud-cli-datastore-emulator ===
PiperMe 👍 1
C. Install the google-cloud-sdk-datastore-emulator component using the apt get install command. Here's why: A. Export Cloud Datastore data: This wouldn't help with local testing as it simply exports your data, not the Datastore environment itself. B. Create a Cloud Datastore index: Creating an index wouldn't allow you to run a local emulator for testing. C. Install the google-cloud-sdk-datastore-emulator component using apt get install: This method is the recommended way to install the Cloud Datastore Emulator on Ubuntu when the Cloud SDK is installed from the Google Cloud Ubuntu package repository. D. Install the cloud-datastore-emulator component using the gcloud components install command: This command would work if you had installed the Cloud SDK using the gcloud installer instead of the Ubuntu package repository.
Bagibo 👍 2
D -Option C suggests installing the google-cloud-sdk-datastore-emulator component using the apt-get install command. However, the Cloud SDK components are typically managed using the gcloud components command, and the correct component name for the Cloud Datastore Emulator is cloud-datastore-emulator. So, to ensure consistency and compatibility with the Cloud SDK's management commands, it's recommended to use the gcloud components install command to install the Cloud Datastore Emulator, making option D the more appropriate choice.
Bagibo 👍 2 Selected: D
Option C suggests installing the google-cloud-sdk-datastore-emulator component using the apt-get install command. However, the Cloud SDK components are typically managed using the gcloud components command, and the correct component name for the Cloud Datastore Emulator is cloud-datastore-emulator. So, to ensure consistency and compatibility with the Cloud SDK's management commands, it's recommended to use the gcloud components install command to install the Cloud Datastore Emulator, making option D the more appropriate choice.
AndyMandy 👍 2 Selected: D
https://cloud.google.com/datastore/docs/tools/datastore-emulator
kaby1987 👍 1 Selected: C
Ans is C
Rahul001 👍 2
Installing the emulator The Datastore emulator is a component of the Google Cloud CLI's gcloud CLI. Use the gcloud components install command to install the Datastore emulator: gcloud components install cloud-datastore-emulator //Please go through the documentation and the ans has to be D.
DZ_Ben 👍 1 Selected: D
D for sure
thewalker 👍 1 Selected: D
D Now that you have the gcloud command - Cloud SDK- better to use it: https://cloud.google.com/datastore/docs/tools/datastore-emulator#installing_the_emulator
mufuuuu 👍 1 Selected: C
Install the google-cloud-sdk-datastore-emulator component using the apt get install command.
walker1988 👍 1 Selected: C
Answer C
walker1988 👍 1 Selected: D
Answer D
VaraSrinvas 👍 1 Selected: D
The answer to the question is at, https://cloud.google.com/datastore/docs/tools/datastore-emulator#installing_the_emulator gcloud components install cloud-datastore-emulator
BAofBK 👍 1
C is the best
VijKall 👍 2 Selected: D
gcloud components install cloud-datastore-emulator - This works in today's world, not 3 yrs back. So I will go with option D.
AdelElagawany 👍 1
I think answer is C because of this note in google documentation: https://cloud.google.com/sdk/docs/install#manage_an_installation Note: If you installed the gcloud CLI using apt-get or yum, use apt-get or yum to update or remove components. This functionality isn't available using gcloud components for apt-get and yum installations.
ekta25 👍 1
D. Install the cloud-datastore-emulator component using the gcloud components install command.
the_rizzo 👍 1 Selected: D
Answer is D https://cloud.google.com/datastore/docs/tools/datastore-emulator#installing_the_emulator
scanner2 👍 1 Selected: D
Answer is D
scanner2 👍 1 Selected: D
Correct answer is D. Command = gcloud components install cloud-datastore-emulator https://cloud.google.com/datastore/docs/tools/datastore-emulator#installing_the_emulator
Khalid209 👍 1
"The Cloud SDK was installed from the Google Cloud Ubuntu package repository." For those, who aren't that familiar with Debian/Ubuntu, D seems like an attractive answer. It works as a way to install Datastore...but it does NOT fit the context of the question. I recommend looking back to G Cloud SDK installation (Debian/Ubuntu): https://cloud.google.com/sdk/docs/install#deb Read the "Installation Steps" in the documentation. In Step 3, "sudo apt-get update && sudo apt-get install google-cloud-sdk". Then, Step 4 is additionally adding other components, such as "sudo apt-get install google-cloud-sdk-datastore-emulator". Proving C the correct answer
Captain1212 👍 1 Selected: C
the answer is C
Neha_Pallavi 👍 1
C.Install the google-cloud-sdk-datastore-emulator component using the apt get install command
someone1224 👍 1 Selected: D
The Datastore emulator is a component of the Google Cloud CLI's gcloud CLI. Use the gcloud components install command to install the Datastore emulator: gcloud components install cloud-datastore-emulator https://cloud.google.com/datastore/docs/tools/datastore-emulator
rosh199 👍 1
The answer is C.
Shweta2jun 👍 1
Correct answer is C. Look at the command entered to perform the same. https://github.com/googleapis/google-cloud-datastore/issues/223
dobberzoon 👍 1 Selected: C
The question states, "The Cloud SDK was installed from the Google Cloud Ubuntu package repository." The google-cloud-sok-app-engine-java component can be installed as follows: sudo apt-get install google-cloud-sdk-app-engine-java Installing Cloud SDK Read the "Installation Steps" in the documentation. In Step 3, "sudo apt-get update && sudo apt-get install google-cloud-sak". Then, Step 4 is additionally adding other components, such as "sudo apt-get install google-cloud-sdk-datastore-emulator"
Ark88 👍 1 Selected: D
https://cloud.google.com/datastore/docs/tools/datastore-emulator
bbgcp 👍 2 Selected: C
Verified on Ubuntu. 100% C
Bobbybash 👍 1 Selected: C
C. Install the google-cloud-sdk-datastore-emulator component using the apt get install command. To test your application locally on your laptop with Cloud Datastore, you should install the google-cloud-sdk-datastore-emulator component using the apt get install command. This component provides a local development server that can emulate the Cloud Datastore service. You can then use the Cloud Datastore client libraries to interact with the emulator as if it were the actual Cloud Datastore service. Exporting Cloud Datastore data using gcloud datastore export or creating a Cloud Datastore index using gcloud datastore indexes create is not relevant for testing your application locally with Cloud Datastore. Installing the cloud-datastore-emulator component using the gcloud components install command is also not relevant for testing your application locally with Cloud Datastore on Ubuntu. The google-cloud-sdk-datastore-emulator component is the one you need to install for this purpose.
Nazz1977 👍 1 Selected: D
It is D Installing the emulator: The Datastore emulator is a component of the Google Cloud CLI's gcloud CLI. Use the gcloud components install command to install the Datastore emulator: gcloud components install cloud-datastore-emulator https://cloud.google.com/datastore/docs/tools/datastore-emulator#installing_the_emulator
eBooKz 👍 1 Selected: D
D: Installing the emulator: gcloud components install cloud-datastore-emulator https://cloud.google.com/datastore/docs/tools/datastore-emulator#installing_the_emulator
gishonia 👍 1 Selected: C
If SDK was installed with apt command, then components must also be installed with apt
u422628 👍 1 Selected: D
the answer is d: https://cloud.google.com/datastore/docs/tools/datastore-emulator google provide the installation through the cli command
Somjyoti 👍 1 Selected: C
The question states, "The Cloud SDK was installed from the Google Cloud Ubuntu package repository." The google-cloud-sdk-app-engine-java component can be installed as follows: sudo apt-get install google-cloud-sdk-app-engine-java https://cloud.google.com/sdk/docs/install#deb Read the "Installation Steps" in the documentation. In Step 3, "sudo apt-get update && sudo apt-get install google-cloud-sdk". Then, Step 4 is additionally adding other components, such as "sudo apt-get install google-cloud-sdk-datastore-emulator". https://cloud.google.com/sdk/docs/install-sdk#deb
mrvergara 👍 1 Selected: D
https://cloud.google.com/datastore/docs/tools/datastore-emulator#linux-macos
adtu 👍 1 Selected: C
C makes sense
raaj_p 👍 1
https://cloud.google.com/datastore/docs/tools/datastore-emulator
Irishka01 👍 1
Voting C based on try and error method.
kar_techie 👍 2
I have simulated the steps in my ubuntu machine... Correct answer is D [email protected] :~$ gcloud components install cloud-datastore-emulator ERROR: (gcloud.components.install) You cannot perform this action because the Google Cloud CLI component manager is disabled for this installation. You can run the following command to achieve the same result for this installation: sudo apt-get install google-cloud-sdk-datastore-emulator [email protected] :~$
kar_techie 👍 1
sorry correct answer is C not D
ChristN 👍 1 Selected: C
C is correct. Waouhhh, this is so tricky, debian packages are different. please refer to this page: https://cloud.google.com/sdk/docs/install#deb
Noa2021 👍 1 Selected: C
CCCCCCCCCCCCC
fragment137 👍 1 Selected: C
This is easy. The answer is C. if you search for both packages, there's only one in the Cloud SDK repo on apt: fragment@eden:~$ apt search google-cloud-sdk-datastore-emulator Sorting... Done Full Text Search... Done google-cloud-sdk-datastore-emulator/cloud-sdk,cloud-sdk 410.0.0-0 all Emulator for Google Cloud Datastore. fragment@eden:~$ apt search cloud-datastore-emulator Sorting... Done Full Text Search... Done
PKookNN 👍 1 Selected: D
From: https://cloud.google.com/datastore/docs/tools/datastore-emulator which said clearly gcloud components install cloud-datastore-emulator So D is correct
Kopy 👍 1 Selected: C
I believe answer is C
Roma007 👍 1
Go for C and D ;)
mattcl 👍 1
it is D : https://cloud.google.com/datastore/docs/tools/datastore-emulator#installing_the_emulator
nosense 👍 1 Selected: C
it's C
FaisalJ 👍 1 Selected: D
It is D https://cloud.google.com/datastore/docs/tools/datastore-emulator
Untamables 👍 1 Selected: D
Absolutely D
Erie 👍 2 Selected: C
If "gcloud" was not downloaded directly from Google's website, and was installed through a third-party package manager, gcloud components install will not work. See this Stackoverflow post: https://stackoverflow.com/questions/42697026/install-google-cloud-components-error-from-gcloud-command
PKookNN 👍 1
D is correct
GaneshSurwase 👍 1
The ans is C
anolive 👍 1
I believe is D gcloud components install cloud-datastore-emulator
AwesomeGCP 👍 1
C. Install the google-cloud-sdk-datastore-emulator component using the apt get install command. END OF THE DISCUSSION!!!
ESP_SAP 👍 3
Correct Answer is (D): The Datastore emulator provides local emulation of the production Datastore environment. You can use the emulator to develop and test your application locally. In addition, the emulator can help you generate indexes for your production Firestore in Datastore mode instance and delete unneeded indexes. This page guides you through installing the emulator, starting the emulator, and setting environment variables to connect your application to the emulator. https://cloud.google.com/datastore/docs/tools/datastore-emulator
Shara1997 👍 1 Selected: D
gcloud components install cloud-datastore-emulator option d
akg001 👍 2
Correct ans : D https://cloud.google.com/datastore/docs/tools/datastore-emulator
abirroy 👍 1 Selected: D
Install the cloud-datastore-emulator component using the gcloud components install command
theBestStudent 👍 1 Selected: C
https://cloud.google.com/sdk/docs/downloads-apt-get
bobthebuilder55110 👍 1 Selected: C
The answer is C. I tested that and @XRiddlerX is correct it will give you error along with note to use "sudo apt-get install google-cloud-sdk-datastore-emulator" this command to achieve the same results.
ultrAslan 👍 2 Selected: C
Im confused when I read all those comments :D
Angel_99 👍 1
Ans: C Question says the installation was done from "Google Cloud Ubuntu package repository" if so, you should use apt to install the sdk components.
RanjithK 👍 2 Selected: D
Go with D
AzureDP900 👍 1
https://cloud.google.com/sdk/docs/install-sdk#deb C is right
haroldbenites 👍 2
Go for D https://cloud.google.com/datastore/docs/tools/datastore-emulator
JelloMan 👍 3 Selected: C
C all the way. Read above comments from people that have already tried this.
Aravind_Jarpala 👍 2
D is right answer
gp021 👍 1 Selected: C
apt list google-cloud-sdk-datastore-emulator Listing... Done google-cloud-sdk-datastore-emulator/cloud-sdk 379.0.0-0 all N: There are 228 additional versions. Please use the '-a' switch to see them.
somenick 👍 2 Selected: D
https://cloud.google.com/datastore/docs/tools/datastore-emulator
Rukman 👍 1 Selected: C
Ans: C Please read the question carefully, it says the installation was done from "Google Cloud Ubuntu package repository" if so, you should use apt to install the sdk components
STomar 👍 3
Answer is D. Refer: https://cloud.google.com/datastore/docs/tools/datastore-emulator
RegisFTM 👍 1
C is used to install da emulator on CloudShell. D needs to be used for Ubuntu, Windows, etc.
vishnukumartr 👍 1
C. Install the google-cloud-sdk-datastore-emulator component using the apt get install command.
mateo2121 👍 4
Wrong answer, the correct is D! To use the Datastore emulator you need: -A Java JRE (version 8 or greater) -The Google Cloud SDK -An application built using the Google Cloud Client Libraries; Installing the emulator: The Datastore emulator is a component of the Google Cloud SDK's gcloud tool. Use the gcloud components install command to install the Datastore emulator: gcloud components install cloud-datastore-emulator https://cloud.google.com/datastore/docs/tools/datastore-emulator
ericyev 👍 4
it looks D is correct gcloud components install cloud-datastore-emulator
FernandoJ 👍 4 Selected: D
https://cloud.google.com/datastore/docs/tools/datastore-emulator
alex90fin 👍 2
D visit https://cloud.google.com/datastore/docs/tools/datastore-emulator The Datastore emulator provides local emulation of the production Datastore environment. You can use the emulator to develop and test your application locally. In addition, the emulator can help you generate indexes for your production Datastore instance and delete unneeded indexes. This page guides you through installing the emulator, starting the emulator, and setting environment variables to connect your application to the emulator.
Rameshmfm 👍 4
Ans is D - Please refer this link https://cloud.google.com/datastore/docs/tools/datastore-emulator
Giordano89 👍 2
C. https://cloud.google.com/sdk/docs/install#deb
Swapsss 👍 1
option c
MONICA291012 👍 2
D Installing the emulator The Datastore emulator is a component of the Google Cloud SDK's gcloud tool. Use the gcloud components install command to install the Datastore emulator gcloud components install cloud-datastore-emulator
associatecloudexamuser 👍 2
Answer is D. gcloud components install cloud-datastore-emulator
JH86 👍 1
my final asnwer is C, due to the following: https://cloud.google.com/sdk/docs/components#additional_components For example, the google-cloud-sdk-app-engine-java component can be installed as follows: sudo apt-get install google-cloud-sdk-app-engine-java
JH86 👍 1
confused with C or D. google docs has recommended D. https://cloud.google.com/sdk/docs/components#additional_components Installing components To install a component at the current version of your Cloud SDK installation, run gcloud components install: gcloud components install [COMPONENT-ID] where component-id = cloud-datastore-emulator
Caribou 👍 1
B B. Create a Cloud Datastore index using gcloud datastore indexes create. to use datastore, you need configure index first: https://cloud.google.com/datastore/docs/tools/indexconfig
Bha9886 👍 1
Installing the emulator The Datastore emulator is a component of the Google Cloud SDK's gcloud tool. Use the gcloud components install command to install the Datastore emulator: gcloud components install cloud-datastore-emulator
mcaromit 👍 1
C is correct
Finger41 👍 1
I belive the answer is C: I think there is a tricck to this question, as per google "If you installed the Cloud SDK through the apt or yum package managers, you can also install additional Cloud SDK components using those same package managers." https://cloud.google.com/sdk/docs/components#external_package_managers
ViMan 👍 1
D. https://cloud.google.com/datastore/docs/tools/datastore-emulator#installing_the_emulator
jahnu 👍 1
Ans C: Update the package list and install the Cloud SDK sudo apt-get update && sudo apt-get install google-cloud-sdk
jahnu 👍 1
Ans C : Updat e the package list and install the Cloud SDK sudo apt-get update && sudo apt-get install google-cloud-sdk
Biju1 👍 3
Answer C Last login: Sun Apr 18 14:48:59 2021 from 74.125.45.70 bijumathewt@instance-1:~$ sudo apt-get install google-cloud-sdk-datastore-emulator Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package google-cloud-sdk-datastore-emulator bijumathewt@instance-1:~$
cbarg 👍 1
To me it's D, cause it says that the SDK is already installed in the Ubuntu. You just need to install de emulator using gcloud. You can see https://cloud.google.com/datastore/docs/tools/datastore-emulator: To use the Datastore emulator you need: A Java JRE (version 8 or greater) The Google Cloud SDK An application built using the Google Cloud Client Libraries Installing the emulator The Datastore emulator is a component of the Google Cloud SDK's gcloud tool. Use the gcloud components install command to install the Datastore emulator: gcloud components install cloud-datastore-emulato
Jacky_YO 👍 1
ANS : C Google Recommended installation Installing Google Cloud SDK https://cloud.google.com/sdk/docs/install#deb
yuvi69 👍 1
answer is C
Steve21 👍 1
In Windows D worked for me, so C or D??
ace_student 👍 2
It's a different scenario, as the question specifies: "You have a developer laptop with the Cloud SDK installed on Ubuntu". I would go for option C given the documentation at : https://cloud.google.com/sdk/docs/install#deb
GCP_Student1 👍 4
C. Install the google-cloud-sdk-datastore-emulator component using the apt get install command.
EABDAJA 👍 2
C. Install the google-cloud-sdk-datastore-emulator component using the apt get install command.
JackGlemins 👍 4
C 100%: https://cloud.google.com/datastore/docs/tools/datastore-emulator Installing the emulator The Datastore emulator is a component of the Google Cloud SDK's gcloud tool. Use the gcloud components install command to install the Datastore emulator: gcloud components install cloud-datastore-emulator
raidenrock 👍 3
that'd D
EABDAJA 👍 2
Answer is C
victory108 👍 2
C - Install the google-cloud-sdk-datastore-emulator component using the apt get install command.
vcafe 👍 3
C is correct. Just validated it. If you try gcloud components install, you will get an error and point you to run apt-get install. See below. gcloud components install cloud-datastore-emulator ERROR: (gcloud.components.install) You cannot perform this action because the Cloud SDK component manager is disabled for this installation. You can run the following command to achieve the same result for this installation: sudo apt-get install google-cloud-sdk-datastore-emulator
PhilipAWS 👍 3
D is right choice Baby :) - The Datastore emulator is a component of the Google Cloud SDK's gcloud tool. Use the gcloud components install command to install the Datastore emulator: gcloud components install cloud-datastore-emulator
ShakthiGCP 👍 2
sorry baby. you are wrong. Dont confuse the group. The right answer is C. https://cloud.google.com/sdk/docs/quickstart#deb
tuta 👍 1
have you taken exam yet - how accurate is the questions in the dump?
JKRowlings 👍 1
Ans is C: Cloud SDK component google cloud sdk datastore emulator is not installed by default when you install the Cloud SDK on Ubuntu.
Liongeek 👍 1
It's never installed by default.
cRobert 👍 1
https://cloud.google.com/sdk/docs/install Provides available commands https://cloud.google.com/datastore/docs/tools/datastore-emulator Provides the emulator component. I answer D
alpharomeo9 👍 2
When you choose option D gcloud components install cloud-datastore-emulator ERROR: (gcloud.components.install) You cannot perform this action because this Cloud SDK installation is managed by an external package manager. Please consider using a separate installation of the Cloud SDK created through the default mechanism described at: https://cloud.google.com/sdk/ So I will choose option C as answer
alpharomeo9 👍 2
For further you can find here https://cloud.google.com/sdk/docs/install go to point number 4 on debian/ubuntu. It says Optionally, install any of these additional components: google-cloud-sdk-app-engine-python google-cloud-sdk-app-engine-python-extras google-cloud-sdk-app-engine-java google-cloud-sdk-app-engine-go google-cloud-sdk-bigtable-emulator google-cloud-sdk-cbt google-cloud-sdk-cloud-build-local google-cloud-sdk-datalab google-cloud-sdk-datastore-emulator google-cloud-sdk-firestore-emulator google-cloud-sdk-pubsub-emulator kubectl For example, the google-cloud-sdk-app-engine-java component can be installed as follows: sudo apt-get install google-cloud-sdk-app-engine-java
ShakthiGCP 👍 6
Go With 'C' ... just tried creating a ubuntu server and verified these.. Dont worry about any other options. https://cloud.google.com/sdk/docs/quickstart#deb check this link .
Bhagirathi 👍 1
kindly do not confuse with different options. correct one is D.
jas21 👍 2
yes, its D
Artiel 👍 2
D. You use apt or yum only if your package manager cannot find these packages (external package), and that's not the case. You can do it with C and D, but D is preferable.
YellowMango 👍 2
It's C, I've tested it.
swatititame 👍 4
• C. Install the google-cloud-sdk-datastore-emulator component using the apt get install command.
vsmax 👍 5
Anwer is C - Checked 1. Add google repo, update and then install : apt-get install google-cloud-sdk-datastore-emulator if you try to install with gcloud you will get the error: ERROR: (gcloud.components.install) You cannot perform this action because this Cloud SDK installation is managed by an external package manager. Please consider using a separate installation of the Cloud SDK created through the default mechanism described at: https://cloud.google.com/sdk/
Eshkrkrkr 👍 3
The answer is C. When you install SDK using apt Cloud SDK Component Manager is disabled and you need to install extra packages again using apt. https://cloud.google.com/sdk/docs/components#managing_cloud_sdk_components Note: These instructions will not work if you have installed Cloud SDK using a package manager such as APT or yum because Cloud SDK Component Manager is disabled when using that method of installation.
Liongeek 👍 1
That's not true. Cloud SDK Component Manager is disabled if you used APT or yum, but the question it clearly says you used Ubuntu(apt)
SWObaby 👍 23
I believe the answer is C... It is a tricky question!! The question states, "The Cloud SDK was installed from the Google Cloud Ubuntu package repository." For those, who aren't that familiar with Debian/Ubuntu, D seems like an attractive answer. It works as a way to install Datastore...but it does NOT fit the context of the question. I recommend looking back to G Cloud SDK installation (Debian/Ubuntu): https://cloud.google.com/sdk/docs/install#deb Read the "Installation Steps" in the documentation. In Step 3, "sudo apt-get update && sudo apt-get install google-cloud-sdk". Then, Step 4 is additionally adding other components, such as "sudo apt-get install google-cloud-sdk-datastore-emulator". Proving C the correct answer.
ritzheg 👍 1
D. https://cloud.google.com/datastore/docs/tools/datastore-emulator
ritzheg 👍 3
Sorry its C. https://cloud.google.com/sdk/docs/install#deb
nmohapatra87 👍 1
Guys, the answer is D for 100% sure.
hems4all 👍 2
D is the Right Answer: Datastore emulator is a gcloud component, and you can't install gcloud components using apt get. So this option is not right. Install Datastore emulator to provide local emulation of the production datastore environment in your local workstation by running gcloud components install. is the right answer. The Datastore emulator provides local emulation of the production Datastore environment. You can use the emulator to develop and test your application locally. Ref: https://cloud.google.com/datastore/docs/tools/datastore-emulator
nwk 👍 1
Vote D
glam 👍 2
I mean try reproducing requirements in question along with D steps.
ting_66 👍 2
Guys, the answer is D for 100% sure. C is wrong, just because the command should be "apt-get install" NOT "apt get install"
Eshkrkrkr 👍 3
Lol, it's just a typo.
glam 👍 2
did you execute D as well? that too will throw you error. Please revalidate.
glam 👍 3
C. Install the google-cloud-sdk-datastore-emulator component using the apt get install command.
prasanu 👍 1
Answer is D,
prasanu 👍 2
I take it back, the answer is C...Just verified now when we want to install packages we would need to sudo apt-get install google-cloud-sdk-datastore-emulator
Ale1973 👍 14
Yes, but it says that "The Cloud SDK was installed from the Google Cloud Ubuntu package repository", then to install datastore emulator you should use the command in Option C.
sapguru 👍 4
Answer is D if gcloud sdk not installed, answer would have been C https://cloud.google.com/sdk/docs/downloads-apt-get Since gcloud SDK is installed, option D https://cloud.google.com/datastore/docs/tools/datastore-emulator#installing_the_emulator
SSPC 👍 1
I agree with you. The answer is D
ShakthiGCP 👍 1
Answer is Not D . 100% it is C . Check this. https://cloud.google.com/sdk/docs/quickstart#deb
filco72 👍 1
I would confirm D as per: https://cloud.google.com/datastore/docs/tools/datastore-emulator#installing_the_emulator
filco72 👍 3
Though https://cloud.google.com/sdk/docs/downloads-apt-get reports that on Ubuntu or Debian use apt or yum. Therefore C
mbiy 👍 6
Ans is C, as Cloud SDK was installed using Ubuntu package manager, if you have installed Cloud SDK using a package manager such as APT or yum then Cloud SDK Component Manager is disabled. Hence the correct option is C i.e. to use package manager to install datastore emulator.
kaby1987 👍 1
thanks for explaination
myuniquename 👍 36
absolutely insane if that question comes up during the associate exam, who on earth would know that off the top of their heads?
Ale1973 👍 8
WOW!!! Today I have learned a new and interesting thing thanks to you...
stepkurniawan 👍 4
it says that in your Ubuntu, you have Cloud SDK installed already. So it should be able to run the command in D
Bituz 👍 2
D as per the doc
someoneinthecloud 👍 52
I believe answer is C https://cloud.google.com/sdk/docs/downloads-apt-get The question is not about the datastore command itself but from where we should run the update command on the Ubuntu to install the component.
XRiddlerX 👍 56
I agree with this comment. The answer is C. If you installed the SDK from the Ubuntu repo and try to do the following: $ gcloud components install cloud-datastore-emulator You will receive this message: ERROR: (gcloud.components.install) You cannot perform this action because the Cloud SDK component manager is disabled for this installation. You can run the following command to achieve the same result for this installation: sudo apt-get install google-cloud-sdk-datastore-emulator
Ciumela 👍 1
https://cloud.google.com/datastore/docs/tools/datastore-emulator
professor 👍 27
Ans is D https://cloud.google.com/datastore/docs/tools/datastore-emulator
Eshkrkrkr 👍 26
Wrong! The answer is C! When you install SDK using apt Cloud SDK Component Manager is disabled and you need to install extra packages again using apt. https://cloud.google.com/sdk/docs/components#managing_cloud_sdk_components Note: These instructions will not work if you have installed Cloud SDK using a package manager such as APT or yum because Cloud SDK Component Manager is disabled when using that method of installation.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

The question explicitly states the Cloud SDK on Ubuntu came from the Google Cloud Ubuntu package repository (installed via apt). Google's own documentation notes that instructions involving the component manager "will not work if you have installed Cloud SDK using a package manager such as APT or yum because Cloud SDK Component Manager is disabled." For that install type, optional components are delivered as separate Debian packages, and the Datastore emulator is the package google-cloud-sdk-datastore-emulator, installed with sudo apt-get install google-cloud-sdk-datastore-emulator. That matches option C exactly and gives the developer a locally runnable emulator for testing the application against Datastore.

Why the Other Options Are Wrong

Option D, gcloud components install cloud-datastore-emulator, is the correct procedure only for installations that manage themselves (zip/tarball, bundled, or installer-based); on an apt-based install it raises an error saying the component manager is disabled, so it cannot accomplish the goal here. Option A, gcloud datastore export, exports production Cloud Datastore data to Cloud Storage — it neither installs an emulator nor supports local testing, and it requires a running Datastore instance. Option B, gcloud datastore indexes create, only creates a composite index in a live Datastore database and is unrelated to setting up a local development environment.

Community Comment Notes

The community converges strongly on C. XRiddlerX reproduces the failure of the D route, noting the error "You cannot perform this action because the Cloud SDK component manager is disabled for this installation" and quoting the apt-based alternative. SWObaby captures the trap well, observing that the question's phrase about the Ubuntu package repository is decisive and that D "seems like an attractive answer" but "does NOT fit the context of the question." Eshkrkrkr cites the official components doc warning that the component-manager steps fail for APT or yum installs, and ShakthiGCP reports having verified the answer on a fresh Ubuntu server. Only one voice, professor, argued for D by pointing at the emulator documentation page, but that page's gcloud components install route does not apply to the installation method stated in the question.

Official Reference

Exam Strategy

Read the installation method as the deciding constraint — whenever a question mentions apt, yum, or a package repository, assume the gcloud component manager is disabled and reach for the package manager. Cross-check each option against the stated environment rather than against what is merely a valid command elsewhere.

Frequently Asked Questions

Why doesn't 'gcloud components install cloud-datastore-emulator' work on my Ubuntu laptop?

Because the Cloud SDK installed from the Google Cloud Ubuntu apt repository has its Component Manager disabled. gcloud returns an error telling you to install optional components through the package manager instead.

What package do I install with apt-get to test Cloud Datastore locally?

Use sudo apt-get install google-cloud-sdk-datastore-emulator. It adds the Datastore emulator component, which you then start with the gcloud beta emulators datastore start command for local testing.

More ACE FAQ →

Related Analysis

Practice All ACE Questions

Access 84 questions with complete answers and detailed explanations.

View Full ACE Practice Test →

← Back to ACE Study Guide