LoginSignup
1
3

More than 5 years have passed since last update.

pyenvでインストールしようとした際のBUILD FAILEDエラー対処

Posted at

環境

Linux, macOSも同様かと

エラー

$ pyenv install anaconda3-5.2.0
Downloading Anaconda3-5.2.0-Linux-x86_64.sh...
-> https://repo.continuum.io/archive/Anaconda3-5.2.0-Linux-x86_64.sh
error: failed to download Anaconda3-5.2.0-Linux-x86_64.sh

BUILD FAILED (CentOS 7.3 using python-build 1.2.7-11-g835707da)

どうやらダウンロードに失敗しているみたい。

-vオプションで詳細表示

$ pyenv install -v anaconda3-5.2.0
/tmp/python-build.20181029135756.168580 ~
Downloading Anaconda3-5.2.0-Linux-x86_64.sh...

10/29 13:57:56 [NOTICE] Downloading 1 item(s)

10/29 13:57:56 [ERROR] CUID#7 - Download aborted. URI=https://pyenv.github.io/pythons/09f53738b0cd3bb96f5b1bac488e5528df9906be2480fe61df40e0e0d19e3d48
Exception: [AbstractCommand.cc:351] errorCode=1 URI=https://pyenv.github.io/pythons/09f53738b0cd3bb96f5b1bac488e5528df9906be2480fe61df40e0e0d19e3d48
  -> [SocketCore.cc:1015] errorCode=1 SSL/TLS handshake failure: unable to get local issuer certificate

10/29 13:57:56 [NOTICE] Download GID#305477b33aa2574c not complete:

Download Results:
gid   |stat|avg speed  |path/URI
======+====+===========+=======================================================
305477|ERR |       0B/s|https://pyenv.github.io/pythons/09f53738b0cd3bb96f5b1bac488e5528df9906be2480fe61df40e0e0d19e3d48

Status Legend:
(ERR):error occurred.

aria2 will resume download if the transfer is restarted.
If there are any errors, then see the log file. See '-l' option in help/man page for details.
-> https://repo.continuum.io/archive/Anaconda3-5.2.0-Linux-x86_64.sh

10/29 13:57:56 [NOTICE] Downloading 1 item(s)

10/29 13:57:56 [ERROR] CUID#7 - Download aborted. URI=https://repo.continuum.io/archive/Anaconda3-5.2.0-Linux-x86_64.sh
Exception: [AbstractCommand.cc:351] errorCode=1 URI=https://repo.continuum.io/archive/Anaconda3-5.2.0-Linux-x86_64.sh
  -> [SocketCore.cc:1015] errorCode=1 SSL/TLS handshake failure: unable to get local issuer certificate

10/29 13:57:56 [NOTICE] Download GID#220ed3b0beb09342 not complete: /tmp/python-build.20181029135756.168580/Anaconda3-5.2.0-Linux-x86_64.sh

Download Results:
gid   |stat|avg speed  |path/URI
======+====+===========+=======================================================
220ed3|ERR |       0B/s|/tmp/python-build.20181029135756.168580/Anaconda3-5.2.0-Linux-x86_64.sh

Status Legend:
(ERR):error occurred.

aria2 will resume download if the transfer is restarted.
If there are any errors, then see the log file. See '-l' option in help/man page for details.
error: failed to download Anaconda3-5.2.0-Linux-x86_64.sh

BUILD FAILED (CentOS 7.3 using python-build 1.2.7-11-g835707da)

インストールしていた高速ダウンローダー aria2 が正常に動作していないようだ。

解決策

aria2へのPATHを外して使用されるのをやめさせる。aria2が入っていなければ代わりにcurlを使ってくれるようになる。
私の場合は,linuxbrewでaria2cをインストールしていたので,一時的にPATHを外す。

$ export PATH=$(sed 's|:\?/home/user_id/.linuxbrew/bin||;s/^://' <<< $PATH)
$ pyenv install anaconda3-5.2.0

正常にインストールできた。

参考

1
3
0

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
1
3