Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyenv install fails at download stage (moved, reopened) #303

Closed
marchoeppner opened this issue Jan 13, 2015 · 8 comments
Closed

pyenv install fails at download stage (moved, reopened) #303

marchoeppner opened this issue Jan 13, 2015 · 8 comments

Comments

@marchoeppner
Copy link

Sorry for posting this over on the installer page... Anyway:

ORIGINAL REPORT:

When trying to install a python version through pyenv, I get the following error:

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

BUILD FAILED (Scientific 6.5 using python-build 20141211-6-g995da2d)

ORIGINAL REPLY:
The pyenv-installer is just a single file shell script to clone pyenv from GitHub repo to local machine. It doesn't configure nothing to your shell. Here isn't right place to report the issue.

By default, pyenv install (== python-build) tries to download python archives from https://yyuu.github.io/pythons/ if it is available. Please check if you can download https://yyuu.github.io/pythons/74d70b914da4487aa1d97222b29e9554d042f825f26cb2b93abd20fdda56b557 and unset PYTHON_BUILD_SKIP_MIRROR if you cannot download it from the mirror (you're in behind some firewall?).

https://github.com/yyuu/pyenv/blob/995da2df89ea0de6717c9a13ec9715238dc5b5c8/plugins/python-build/bin/python-build#L1670

FURTHER COMMENTS:

ERROR: certificate common name “www.github.com” doesn’t match requested host name “yyuu.github.io”.

  • The variable PYTHON_BUILD_SKIP_MIRROR is unset anyway, so unsetting that doesn't do much.

So I am still where I started. Any idea what is going wrong here?

@yyuu
Copy link
Contributor

yyuu commented Jan 13, 2015

Please let me know the version of wget and curl.

@marchoeppner
Copy link
Author

GNU Wget 1.12 built on linux-gnu.
curl 7.15.3 (x86_64-unknown-linux-gnu) libcurl/7.15.3 OpenSSL/0.9.8w

@yyuu
Copy link
Contributor

yyuu commented Jan 15, 2015

You're using very old curl/wget which don't support SNI. Setting http://yyuu.github.io/pythons as PYTHON_BUILD_MIRROR_URL might help.

http://en.m.wikipedia.org/wiki/Server_Name_Indication

@yyuu yyuu closed this as completed Jan 15, 2015
@autolife
Copy link

In the centos 5.10,we should set the Setting http://yyuu.github.io/pythons as PYTHON_BUILD_MIRROR_URL in the .bashrc. then it runs ok. thank you very much

@jfonte
Copy link

jfonte commented Jun 1, 2015

@yyuu Thx. Your suggestion fixed it on my box!

@huangziwei
Copy link

I encountered the same problem, and this post solved it: pyenv で BUILD FAILED

@rcarmo
Copy link

rcarmo commented Aug 6, 2016

Every month or so I come up against this again when setting up a new dev machine or build server, so I'd really like to see a permanent fix for python-build. Maybe even (gasp) a Python script to download the tarball?

As of today, I'm getting this on OSX 10.11.6 (which ships with curl 7.43) and the latest pyenv from homebrew (20160726).

Installing wget1.18 didn't fix it offhand, because curl is tried first. Since I can't really risk replacing the built-in curl (I can do so using brew, but I'd rather not break some native OSX scripts that I know use curl and libcurl) and aliasing curl every time isn't an option, I just went into python-build and switched the order of wget vs curl.

Besides having this break on outdated servers (which I'll grant need upgrading anyway), it's kind of annoying for it not to work on an otherwise "regular" configuration that ships out of the box from Apple, so I really would love to see this fixed. Having SNI on the server is great, sure, and you can't fix that, but could you please consider fixing python-build in this regard?

@shakib609
Copy link

I was facing the same issue on my ubuntu machine.
Then I just uninstalled curl and pyenv started to behave correctly again.
After installing python reinstalled curl.
But definitely need a permanent fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants