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

./emsdk install latest : Installation failed #6723

Closed
pierreglibert opened this issue Jun 19, 2018 · 12 comments
Closed

./emsdk install latest : Installation failed #6723

pierreglibert opened this issue Jun 19, 2018 · 12 comments

Comments

@pierreglibert
Copy link

pierreglibert commented Jun 19, 2018

Hi community :)
I have some loading error ...
I'm on mac osx 10.13.5 & python 2.7.15.
Can you help me please ?

$ ./emsdk install latest

Fetching all tags from Emscripten Github repository...
Done. 134 tagged releases available, latest is 1.38.6.
Fetching all tags from Binaryen Github repository...
Done. 61 tagged Binaryen releases available, latest is 1.38.6.
Fetching all precompiled tagged releases..
Error downloading URL 'https://s3.amazonaws.com/mozilla-games/emscripten/packages/llvm/tag/osx_32bit/index.txt': <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)>
Error downloading URL 'https://s3.amazonaws.com/mozilla-games/emscripten/packages/llvm/tag/osx_64bit/index.txt': <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)>
Installing SDK 'sdk-1.35.0-64bit'..
Installing tool 'clang-e1.35.0-64bit'..
Error downloading URL 'https://s3.amazonaws.com/mozilla-games/emscripten/packages/emscripten-clang_e1.35.0.tar.gz': <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)>
Installation failed!

$ python --version

Python 2.7.15
@Becavalier
Copy link
Contributor

@pierreglibert

This error was caused by did't passing https certs related verifications, you can bypass this error by using default https context, add the following code into "emsdk", and try the same command again.

import ssl
ssl._create_default_https_context = ssl._create_unverified_context

These two lines of code will globally disabling the verification of https certs, though it's not recommend to use, it did work.

@kripken
Copy link
Member

kripken commented Jun 20, 2018

This may also be related to #6275 , if so then using a newer python may fix it.

@pierreglibert
Copy link
Author

Hi @Becavalier & @kripken :)
The solution of @Becavalier works.
Thanks ! 👍

@Becavalier
Copy link
Contributor

@pierreglibert You're welcome, issue can be closed now.

@erik-larsen
Copy link

I just ran into this issue installing emsdk on a new Mac, even with Python 2.7.15 (the latest Python 2.7) pre-installed. I think there is a better solution than disabling certificate verification. Here is what worked for me:

  1. Install Python 2.7.15 on Mac
  2. Go to /Applications/Python 2.7 and run "Install Certificates.command"
  3. Install emsdk following the normal steps at https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html.

Step 2 is the key, and the reasoning behind it is explained in /Applications/Python 2.7/ReadMe.rtf, under section [CHANGED in 2.7.15]. Essentially this will "install a curated bundle of default root certificates".

@kripken If someone else can confirm this fixes emsdk installs on fresh Macs, perhaps it could be added to https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html#mac-os-x.

@kripken
Copy link
Member

kripken commented Jul 21, 2018

Thanks @erik-larsen, yeah, would be good if others can confirm this, and then we should add it to those docs.

@weewam
Copy link

weewam commented Oct 3, 2018

@erik-larsen Thank you so much for this, worked perfectly for me 🥇

@AlohaWorld
Copy link

I found an easy way on windows to solve this problem.

  1. Install anaconda with its default python build
  2. open anaconda prompt
  3. execute emsdk install latest

The default python build in anaconda suite is of version 3.x

@hixus
Copy link

hixus commented Jun 23, 2019

I just ran into this issue installing emsdk on a new Mac, even with Python 2.7.15 (the latest Python 2.7) pre-installed. I think there is a better solution than disabling certificate verification. Here is what worked for me:

  1. Install Python 2.7.15 on Mac
  2. Go to /Applications/Python 2.7 and run "Install Certificates.command"
  3. Install emsdk following the normal steps at https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html.

Step 2 is the key, and the reasoning behind it is explained in /Applications/Python 2.7/ReadMe.rtf, under section [CHANGED in 2.7.15]. Essentially this will "install a curated bundle of default root certificates".

I had also run the install with python ./emsdk install latest not just ./emsdk install latest as it seems to default to system provided python.

@StupidZhe
Copy link

@pierreglibert

This error was caused by did't passing https certs related verifications, you can bypass this error by using default https context, add the following code into "emsdk", and try the same command again.

import ssl
ssl._create_default_https_context = ssl._create_unverified_context

These two lines of code will globally disabling the verification of https certs, though it's not recommend to use, it did work.

IT WORKS! THANKS!

@ghost
Copy link

ghost commented Aug 2, 2019

Worked with python ./emsdk install latest.

@liushuaidi
Copy link

@pierreglibert

This error was caused by did't passing https certs related verifications, you can bypass this error by using default https context, add the following code into "emsdk", and try the same command again.

import ssl
ssl._create_default_https_context = ssl._create_unverified_context

These two lines of code will globally disabling the verification of https certs, though it's not recommend to use, it did work.

you should put the code into emsdk.py

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

9 participants