10
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

gcloudコマンドがぶっ壊れた話

Posted at

症状

ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha1
and more

https://cloud.google.com/sdk/install
見てねって言われてたので、見ましたが何も解決しません。

hash typeとか言われているので、opensslかなぁと思って、

brew install openssl
brew link openssl --force
brew uninstall python
brew install python --with-brewed-openssl


はやりましたが、症状が変わりません。

これはPythonの問題かなぁと思って、

brew uninstall python
brew install python

としますが、ダメです。
というかあれ、Python3系じゃん。
とここで気づきます。

2系とパスがbrewの仕様で変わっていそうなので

brew install python@2

$ brew list | grep python
python@2

としますが、なんかだめです。

バージョンの問題かなぁとか思いまして、

$ brew update && brew upgrade

をしたらいい感じにアップデートしてくれます。
これで直りました!!

同じエラーに悩まされた人の役に立てば幸いです。

10
3
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?