an odd fellow

仕事のメモ

pyenv で BUILD FAILED

> pyenv install 3.4.3                                                                                 
Downloading Python-3.4.3.tgz...
-> https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tgz
error: failed to download Python-3.4.3.tgz

BUILD FAILED (Ubuntu 14.04 using python-build 20151105-2-g12ad6f6)

こうなったら/tmp/python-build-*でログが出ているので読む。ボクの場合はこんな感じだった

/tmp/python-build.20151108181341.11523 ~
curl: (77) error setting certificate verify locations:
  CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none

ボクが使っているのは ubuntu だから /etc/pki/tls/certs にはca-bundle.crt は無い。シンボリックリンクを張って解決。

# ln -s /etc/ssl/certs/ca-certificates.crt  /etc/pki/tls/certs/ca-bundle.crt

pyenv でなんかいじっていたら python-build のバージョンあげろとか言ってきて、 ~/.pyenv/plugins/python-build/ で git pull したのが原因だと思う(たぶん)。このときにca-bundle.crt のファイルパスが RedHat 用のに書き換わったんじゃないかしら。