2

In the instructions for installing google-cloud-sdk-app-engine-python, it runs you through installing the gcloud SDK. It starts out innocent enough:

I would run sudo apt-get install google-cloud-sdk and get this:

[...]
Setting up google-cloud-sdk (178.0.0-0) ...
Killed
dpkg: error processing package google-cloud-sdk (--configure):
 subprocess installed post-installation script returned error exit status 137
Errors were encountered while processing:
 google-cloud-sdk
E: Sub-process /usr/bin/dpkg returned an error code (1)

Part of my thinking behind setting up an instance on Google Compute Engine was to utilize Google's infrastructure under the impression that maybe it would connect to other parts of Google's infrastructure better, or at least more simply, than doing it from EC2 (or others). Alas... ;)

BrettJ
  • 6,801
  • 1
  • 23
  • 26
wtr
  • 762
  • 8
  • 16

1 Answers1

3

After some decent amount of head-scratching, I came across this SE answer and it dawned on me that my micro instance was suffering from lack of memory during installation:

The direct cause may be a lack of memory. Try to add swap before upgrading.

sudo dd if=/dev/zero of=/var/swap bs=2048 count=524288
sudo chmod 600 /var/swap
sudo mkswap /var/swap
sudo swapon /var/swap
sudo apt upgrade

Upon completion, the installation statements finally worked as one would expect.

wtr
  • 762
  • 8
  • 16