GCP wont work after upgrading to OSX Mojave
Asked Answered
D

1

4

After I upgraded to OSX Mojave (Developer beta 2) I get an error every time I use GCP and also at reinstalling it.

ERROR: gcloud failed to load: No module named zlib
    gcloud_main = _import_gcloud_main()
    import googlecloudsdk.gcloud_main
    from googlecloudsdk.calliope import base
    from googlecloudsdk.calliope import display
    from googlecloudsdk.calliope import display_taps
    from googlecloudsdk.core.resource import resource_printer_base
    from googlecloudsdk.core.resource import resource_projector
    from apitools.base.py import encoding as protorpc_encoding
    from apitools.base.py.base_api import *
    from apitools.base.py import http_wrapper
    import httplib2
    from httplib2.python2.httplib2 import *
    import gzip
    import zlib

I have tried to reinstall python as well as zlib through brew; but it did not work.

Decoration answered 20/6, 2018 at 12:10 Comment(0)
C
5

Per page 3 of the release notes: https://download.developer.apple.com/Developer_Tools/Xcode_10_beta_3/Release_Notes_for_Xcode_10_beta_3.pdf, you first need to install the package at: /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

Then you need to reinstall python2 from brew:

brew reinstall python2

After that you can brew cask install google-cloud-sdk and it will work

Claqueur answered 4/7, 2018 at 1:22 Comment(1)
it's possible you need to reboot after installing the headers. I rebooted and did not test not rebootingClaqueur

© 2022 - 2024 — McMap. All rights reserved.