Last active
November 26, 2017 21:33
-
-
Save mbeltagy/d734e7ae6283c8149282286b47e12cec to your computer and use it in GitHub Desktop.
Getting TensorFlow.jl to build properly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#= | |
I was getting the following errors when running | |
Pkg.update("TensorFlow") | |
On my ubunutu 14.04 | |
INFO: Building TensorFlow.jl for CPU use only. To enable the GPU, set the TF_USE_GPU environment variable to 1 and rebuild TensorFlow.jl | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 | |
curl: (60) server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none | |
More details here: http://curl.haxx.se/docs/sslcerts.html | |
curl performs SSL certificate verification by default, using a "bundle" | |
of Certificate Authority (CA) public keys (CA certs). If the default | |
bundle file isn't adequate, you can specify an alternate file | |
using the --cacert option. | |
If this HTTPS server uses a certificate signed by a CA represented in | |
the bundle, the certificate verification probably failed due to a | |
problem with the certificate (it might be expired, or the name might | |
not match the domain name in the URL). | |
If you'd like to turn off curl's verification of the certificate, use | |
the -k (or --insecure) option. | |
===============================================================================================[ ERROR: TensorFlow ]================================================================================================ | |
LoadError: failed process: Process(`curl -L -f -o /home/user/.julia/TensorFlow/deps/downloads/tensorflow.zip https://storage.googleapis.com/malmaud-stuff/tensorflow_linux_cpu_1.2.0.zip`, ProcessExited(60)) [60] | |
while loading /home/elbeltagy/.julia/TensorFlow/deps/build.jl, in expression starting on line 107 | |
==================================================================================================================================================================================================================== | |
==================================================================================================[ BUILD ERRORS ]================================================================================================== | |
WARNING: TensorFlow had build errors. | |
- packages with build errors remain installed in /home/elbeltagy/.julia | |
- build the package(s) and all dependencies with `Pkg.build("TensorFlow")` | |
- build a single package by running its `deps/build.jl` script | |
==================================================================================================================================================================================================================== | |
=# | |
#=First we need to get the google certificates | |
https://developers.google.com/maps/root-ca-faq#how-do-i-verify-if-my-certificate-store-needs-an-update | |
Specifically | |
https://pki.goog/roots.pem | |
=# | |
# Here we read it and break it down to get cert files. | |
full=readstring("roots.pem"); | |
certs=matchall(r"-----BEGIN.*?-----END\sCERTIFICATE-----\n"sm,full); | |
for i=eachindex(certs) | |
open("google_c$i.crt","w") do io | |
print(io,certs[i]) | |
end | |
end | |
# After you get the files you need to add them to the certificates | |
#= In bash | |
sudo mkdir /usr/share/ca-certificates/google | |
sudo cp google_c*.crt /usr/share/ca-certificates/google/ | |
sudo dpkg-reconfigure ca-certificates | |
=# | |
# In the last line you mark all google bits |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment