Google Cloud SDK (174.0.0-0) Error is driving me F$%ing nuts!!!

This bloody error is coming up every time i want to install any package, do any updates on my webmin server. Its causing installations and updates to take ages! Is there some way i can disable wembin/virtualmin attempting to update this bloody piece of shit google sdk?

Is a work around to enable php7.0 fpm? (i am using CGI i think)

Setting up google-cloud-sdk (174.0.0-0) …
Generating the gcloud CLI and caching in [/usr/lib/google-cloud-sdk/.install/cli/gcloud.py]…
…done.
Killed
dpkg: error processing package google-cloud-sdk (–configure):
subprocess installed post-installation script returned error exit status 137
Processing triggers for php7.0-fpm (7.0.19-1) …
NOTICE: Not enabling PHP 7.0 FPM by default.
NOTICE: To enable PHP 7.0 FPM in Apache2 do:
NOTICE: a2enmod proxy_fcgi setenvif
NOTICE: a2enconf php7.0-fpm
NOTICE: You are seeing this message because you have apache2 package installed.
Errors were encountered while processing:
google-cloud-sdk
E: Sub-process /usr/bin/dpkg returned an error code (1)

still having problems even with the new google cloud update for its sdk…

Get:2 http://security.debian.org stretch/updates/main amd64 libcurl3-gnutls amd64 7.52.1-5+deb9u1 [289 kB]
Fetched 460 kB in 1s (238 kB/s)
Selecting previously unselected package libcurl3-gnutls:amd64.
(Reading database … 89183 files and directories currently installed.)
Preparing to unpack …/libcurl3-gnutls_7.52.1-5+deb9u1_amd64.deb …
Unpacking libcurl3-gnutls:amd64 (7.52.1-5+deb9u1) …
Selecting previously unselected package apt-transport-https.
Preparing to unpack …/apt-transport-https_1.4.8_amd64.deb …
Unpacking apt-transport-https (1.4.8) …
Setting up libcurl3-gnutls:amd64 (7.52.1-5+deb9u1) …
Processing triggers for libc-bin (2.24-11+deb9u1) …
Setting up google-cloud-sdk (175.0.0-0) …
Generating the gcloud CLI and caching in [/usr/lib/google-cloud-sdk/.install/cli/gcloud.py].
…-Killed
dpkg: error processing package google-cloud-sdk (–configure):
subprocess installed post-installation script returned error exit status 137
Setting up apt-transport-https (1.4.8) …
Errors were encountered while processing:
google-cloud-sdk
E: Sub-process /usr/bin/dpkg returned an error code (1)


I have run apt-get update and apt-get upgrade, there is nothing to update.
I really need to sort out this google cloud sdk issue.

Here is what google cloud support had to say about it to another persons request on there own group…
Faizan (Google Cloud Support)

Apr 8

Hello Jason,

Cloud SDK is set of command line tools to manage Google Cloud Platform resources. It comes pre-installed on Google Compute Engine images. The last message you have received is a warning and not an error, as such, no further action is required. You can find more information on Cloud SDK through this link[1].

I hope that helps.

Faizan

that is bumcum…its causing a lot of grief for me and is clearly a lot more than a simple warning error…its making installations, updates and upgrades take a lot longer than necessary.

i tried again after stopping the apache2 service…still the same error.

seems ridiculous that one of their own packages will not update correctly on their own bloody network and server!

my next plan of attack is to stop the instance, increase its resources, then perform the update. If this works, i will then downgrade again after. I wish i could simply get rid of google cloud sdk completely.

That has nothing to do with apache2. It’s literally specific to Google’s CLI tools…it has nothing to do with anything else on your system. This message is coming from dpkg; this is not a system-wide thing, it’s a package manager warning. One package remains in an unconfigured state due to an error encountered during configuration of that one package. It is not affecting anything else on the system and isn’t affected by anything else on the system…any other problems( anything other than package installation) you’re having aren’t related to this.

You could try uninstalling that package (the google sdk package) and reinstalling it. You can also query dpkg to find out what the actual postinstall script contents are, though I don’t remember how to do that…here’s a stack exchange post about it:

https://askubuntu.com/questions/482928/ignore-apt-get-postinstall-scripts-automatically

I’d probably prefer to look inside the postinst instead of removing it, so I could figure out why it’s failing, so I can resolve it for future updates (if it continues to be broken).

ok. so i shut down the google cloud instance and increased it from a micro (1 VPCU, 0.6GB memory) to a standard (1 VCPU, 1.7GB memory) and ran the update again.

This time it has returned the following…
<W: APT had planned for dpkg to do more than it reported back (95 vs 99).
Affected packages: google-cloud-sdk:amd64

I am not sure if this is a better outcome or no different?

EDIT…
I am going to run this update on my other two google cloud micro instances (vestacp and ispconfig) and see what happens.

first update is on micro istance debian 8.9 jessie (ispconfig)…
dpkg: error processing package google-cloud-sdk (–configure):
subprocess installed post-installation script returned error exit status 137
Setting up python-google-compute-engine (2.6.1-1) …
Setting up python3-google-compute-engine (2.6.1-1) …
Setting up google-compute-engine (2.6.1-1) …
Errors were encountered while processing:
google-cloud-sdk
E: Sub-process /usr/bin/dpkg returned an error code (1)

Well ill be damned, the second instance is also a micro instance debian 8.9 jessie (vestacp) and it appears to have worked??? i posted the entire update process below for this one…hope that is ok

root@server2:~# apt-get update
Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Hit http://security.debian.org jessie/updates/main Sources
Hit http://security.debian.org jessie/updates/main amd64 Packages
Hit http://security.debian.org jessie/updates/main Translation-en
Hit http://packages.cloud.google.com cloud-sdk-jessie InRelease
Hit http://packages.cloud.google.com google-compute-engine-jessie-stable InRelease
Hit http://nginx.org jessie InRelease
Hit http://apt.vestacp.com jessie InRelease
Hit http://packages.cloud.google.com google-cloud-packages-archive-keyring-jessie InRelease
Hit http://packages.cloud.google.com cloud-sdk-jessie/main amd64 Packages
Hit http://packages.cloud.google.com google-compute-engine-jessie-stable/main amd64 Packages
Hit http://nginx.org jessie/nginx amd64 Packages
Hit http://packages.cloud.google.com google-cloud-packages-archive-keyring-jessie/main amd64 Packages
Ign http://packages.cloud.google.com cloud-sdk-jessie/main Translation-en_US
Ign http://packages.cloud.google.com cloud-sdk-jessie/main Translation-en
Ign http://packages.cloud.google.com google-compute-engine-jessie-stable/main Translation-en_US
Ign http://packages.cloud.google.com google-compute-engine-jessie-stable/main Translation-en
Ign http://packages.cloud.google.com google-cloud-packages-archive-keyring-jessie/main Translation-en_US
Ign http://packages.cloud.google.com google-cloud-packages-archive-keyring-jessie/main Translation-en
Hit http://apt.vestacp.com jessie/vesta amd64 Packages
Ign http://deb.debian.org jessie InRelease
Get:2 http://deb.debian.org jessie-updates InRelease [145 kB]
Get:3 http://deb.debian.org jessie-backports InRelease [166 kB]
Hit http://deb.debian.org jessie Release.gpg
Hit http://deb.debian.org jessie-updates/main Sources
Get:4 http://deb.debian.org jessie-updates/main amd64 Packages/DiffIndex [8,884 B]
Ign http://nginx.org jessie/nginx Translation-en_US
Get:5 http://deb.debian.org jessie-updates/main Translation-en/DiffIndex [3,688 B]
Ign http://nginx.org jessie/nginx Translation-en
Ign http://apt.vestacp.com jessie/vesta Translation-en_US
Get:6 http://deb.debian.org jessie-backports/main Sources/DiffIndex [27.8 kB]
Ign http://apt.vestacp.com jessie/vesta Translation-en
Get:7 http://deb.debian.org jessie-backports/main amd64 Packages/DiffIndex [27.8 kB]
Get:8 http://deb.debian.org jessie-backports/main Translation-en/DiffIndex [27.8 kB]
Hit http://deb.debian.org jessie Release
Hit http://deb.debian.org jessie/main Sources
Hit http://deb.debian.org jessie/main amd64 Packages
Hit http://deb.debian.org jessie/main Translation-en
Fetched 470 kB in 6s (78.2 kB/s)
Reading package lists… Done
root@server2:~# apt-get upgrade
Reading package lists… Done
Building dependency tree
Reading state information… Done
Calculating upgrade… Done
The following packages will be upgraded:
google-cloud-sdk google-compute-engine libdns-export100 libirs-export91 libisc-export95
libisccfg-export90 python-google-compute-engine python3-google-compute-engine
8 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/15.3 MB of archives.
After this operation, 20.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database … 55289 files and directories currently installed.)
Preparing to unpack …/libisc-export95_1%3a9.9.5.dfsg-9+deb8u14_amd64.deb …
Unpacking libisc-export95 (1:9.9.5.dfsg-9+deb8u14) over (1:9.9.5.dfsg-9+deb8u13) …
Preparing to unpack …/libdns-export100_1%3a9.9.5.dfsg-9+deb8u14_amd64.deb …
Unpacking libdns-export100 (1:9.9.5.dfsg-9+deb8u14) over (1:9.9.5.dfsg-9+deb8u13) …
Preparing to unpack …/libisccfg-export90_1%3a9.9.5.dfsg-9+deb8u14_amd64.deb …
Unpacking libisccfg-export90 (1:9.9.5.dfsg-9+deb8u14) over (1:9.9.5.dfsg-9+deb8u13) …
Preparing to unpack …/libirs-export91_1%3a9.9.5.dfsg-9+deb8u14_amd64.deb …
Unpacking libirs-export91 (1:9.9.5.dfsg-9+deb8u14) over (1:9.9.5.dfsg-9+deb8u13) …
Preparing to unpack …/google-cloud-sdk_175.0.0-0_all.deb …
Unpacking google-cloud-sdk (175.0.0-0) over (168.0.0-0) …
Preparing to unpack …/google-compute-engine_2.6.1-1_all.deb …
Unpacking google-compute-engine (2.6.1-1) over (2.6.0-4) …
Preparing to unpack …/python-google-compute-engine_2.6.1-1_all.deb …
Unpacking python-google-compute-engine (2.6.1-1) over (2.6.0-4) …
Preparing to unpack …/python3-google-compute-engine_2.6.1-1_all.deb …
Unpacking python3-google-compute-engine (2.6.1-1) over (2.6.0-4) …
Processing triggers for man-db (2.7.0.2-5) …
Setting up libisc-export95 (1:9.9.5.dfsg-9+deb8u14) …
Setting up libdns-export100 (1:9.9.5.dfsg-9+deb8u14) …
Setting up libisccfg-export90 (1:9.9.5.dfsg-9+deb8u14) …
Setting up libirs-export91 (1:9.9.5.dfsg-9+deb8u14) …
Setting up google-cloud-sdk (175.0.0-0) …
Generating the gcloud CLI and caching in [/usr/lib/google-cloud-sdk/.install/cli/gcloud.py].
…done.
Setting up python-google-compute-engine (2.6.1-1) …
Setting up python3-google-compute-engine (2.6.1-1) …
Setting up google-compute-engine (2.6.1-1) …
Processing triggers for libc-bin (2.19-18+deb8u10) …
root@server2:~#

FWIW, a Google micro is too small to run apt-get successfully in my experience. It grows too large. I added swap memory creation specifically to get past this problem on Google micro instances. I thought I made the swap file big enough to make it work OK, but apt-get is a memory hog of the highest order. When installing a lot of packages it’ll chew up hundreds of megabytes. I don’t know when this happened or why (you used to be able to run Debian on a 256MB host without trouble…you just can’t anymore, because of apt-get).

If it’s memory related, and it very well could be, increasing the swap file size might help. I think I set it up to always insure at least 1.25GB of available memory (so on a Google micro it’d add about 700MB of swap). If the Debian 8 system doesn’t have Virtualmin on it yet that may also be a factor…obviously all the services Virtualmin installs take up memory (a lot of memory in the case of a full install).

So, yeah, do check your memory consumption. apt-get is a pig.

That’s a different error, but could be the same root cause.

Try running just the configure for that one package using dpkg (don’t do an apt-get upgrade…do a dpkg --configure google-cloud-sdk and see what happens).

Edit: Also, you really need to stop repeating the same actions expecting different results. Do some root cause analysis. Try the thing I linked about getting the postinst accessible so you can look at it and run it independently of apt-get. That can allow you to see why is it failing rather than just watching it mysteriously fail over and over.

Well i think the problem has gone away. Virtualmin package manager today came up with a list of updates a few hours ago. I as stated earlier, i stopped the instance upgraded its resources, performed the update. After installing these updates i am not receiving the google cloud error anymore. I have since downgraded the resources on the instance again as i do not need anything above a micro at present (there are no client websites on the server yet)

I had already attempted the google cloud update, so perhaps it was some other package that needed updating first but the update wasnt available until today?

I cannot understand why i am having problems with this google cloud sdk with two servers (virtualmin and ispconfig) but not the third one (vestacp). It may be as you say, a resources issue and perhaps the vestacp machine is currently the least loaded system at present (its virtually a blank install if i remember correctly).

Anyway, everything is now working on the virtualmin machine…and i have a future plan of attack now should this kind of thing happen again (ie upgrade temporarily for the updates then downgrade again). Once i have clients sites on it, then i will upgrade available resources to a standard instance (1vcpu and 1.7GB memory) anyway.