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

Error when adding packaging on julia #26167

Closed
nsuhaimi opened this issue Feb 23, 2018 · 49 comments
Closed

Error when adding packaging on julia #26167

nsuhaimi opened this issue Feb 23, 2018 · 49 comments
Labels
libgit2 The libgit2 library or the LibGit2 stdlib module system:windows Affects only Windows

Comments

@nsuhaimi
Copy link

nsuhaimi commented Feb 23, 2018

capture

@nsuhaimi
Copy link
Author

Hi keep getting this error even after few times of uninstall, restart and install. Any idea how to fix this??

@zhangliye
Copy link

zhangliye commented Feb 23, 2018

I encountered the same error. I have uninstalled Julia, but it is still not solved. Currently, I cannot use Julia for the work.

@tkind
Copy link

tkind commented Feb 23, 2018

I ran into the same problem. Executing the 'Easy fix' solved it. I hope it helps :)
https://support.microsoft.com/en-us/help/3140245/update-to-enable-tls-1-1-and-tls-1-2-as-a-default-secure-protocols-in

@nalimilan nalimilan added system:windows Affects only Windows libgit2 The libgit2 library or the LibGit2 stdlib module labels Feb 23, 2018
@nalimilan
Copy link
Member

Is this a new error due to Windows updates? Do you understand what is going on and what Julia should do to avoid this?

@andreasnoack
Copy link
Member

See https://discourse.julialang.org/t/pkg-update-error-base-libgit2-test-fails/9272/11. This is because of https://githubengineering.com/crypto-removal-notice/.

@nsuhaimi
Copy link
Author

its all good now! Thanks @andreasnoack and @tkind

@Naetmul
Copy link

Naetmul commented Feb 26, 2018

New users using Windows 7 could really suffer from this issue, because they will not be able to install almost any packages unless they install TLS update.

Even Pkg.init() in Windows 7 does not work before installing Windows TLS update.

At least, there should be some guidelines in Julia Windows how to install page about this issue if the installation exe is not modified.

(In Windows 10, no problem.)

@KristofferC
Copy link
Member

Yes, we might have to release a new 0.6 to fix this... Not sure what others think. The current situation is not good, agreed.

@programistawpf
Copy link

Also I can`t use Pkg.updte() and other in WIN7. Is posible to install somtehing on win 7 ? Some url ?
Paul

@Naetmul
Copy link

Naetmul commented Feb 26, 2018

How to install Windows 7 TLS update is here: #13399 (comment)

@StefanKarpinski
Copy link
Member

StefanKarpinski commented Feb 26, 2018

The text of the original error not as a PNG so that it's findable by search:

ERROR: GitError(Code:ECERTIFICATE, Class:OS, user cancelled certificate check: )

@davidanthoff
Copy link
Contributor

I think this warrants a 0.6.3 release...

@jebej
Copy link
Contributor

jebej commented Feb 26, 2018

Corresponding libgit2 issue: libgit2/libgit2#4546

@simonbyrne
Copy link
Contributor

This also seems to be a problem with GitHub-hosted binaries (see JuliaStats/Rmath-julia#38), which will become a bigger issue as BinaryBuilder.jl is more widely used.

@aviks
Copy link
Member

aviks commented Feb 26, 2018

LibGit2 PR: libgit2/libgit2#4550

We'll need something like that

@nalimilan
Copy link
Member

I'm inclined to take this issue as a warning that we should not rely on a third party like GitHub to provide Julia packages and binaries. Maybe they should be hosted on a dedicated server? Or at least use a URL that we control and which can be made to point at a custom server if that kind of problem happens in the future? That would be really really bad on production systems.

@StefanKarpinski
Copy link
Member

A layer of indirection is not a bad idea. Of course we can also push out new URLs in METADATA / a registry at any point.

@aviks
Copy link
Member

aviks commented Feb 26, 2018 via email

@jebej
Copy link
Contributor

jebej commented Feb 26, 2018

An announcement should probably be made with the link to the Microsoft easy fix.

@programistawpf
Copy link

programistawpf commented Feb 26, 2018 via email

@ebager
Copy link

ebager commented Feb 28, 2018

I cannot stress just how much I love that "Easy Fix".. Spend 2 days being so frustrated and now it finally works again! THANK YOU :D

@programistawpf
Copy link

Unfortunatly something new :
What to do ?

Version 0.6.2 (2017-12-13 18:08 UTC)
Official http://julialang.org/ release
x86_64-w64-mingw32

`julia> Pkg.build("NLopt")
INFO: Building NLopt
INFO: Attempting to create directory C:\Users\PC.julia\v0.6\NLopt\deps\downloads
INFO: Directory C:\Users\PC.julia\v0.6\NLopt\deps\downloads already exists
INFO: Downloading file https://github.com/stevengj/nlopt/releases/download/nlopt-2.4.2/nlopt-2.4.2-dll32.zip
Exception setting "SecurityProtocol": "Cannot convert null to type "System.Net.SecurityProtocolType" due to invalid enu
meration values. Specify one of the following enumeration values and try again. The possible enumeration values are "Ss
l3, Tls"."
At line:1 char:28

Exception calling "DownloadFile" with "2" argument(s): "Połączenie podstawowe zostało zakończone: Wystąpił nieoczekiwan
y błąd przy wysyłaniu."
At line:1 char:121

====================================================[ ERROR: NLopt ]====================================================

LoadError: failed process: Process('C:\Windows\System32\WindowsPowerShell\v1.0\powershell' -NoProfile -Command '[Net.Se rvicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (new-object net.webclient).DownloadFile("https ://github.com/stevengj/nlopt/releases/download/nlopt-2.4.2/nlopt-2.4.2-dll32.zip", "C:\Users\PC\.julia\v0.6\NLopt\deps\d ownloads\nlopt-2.4.2-dll32.zip")', ProcessExited(1)) [1]
while loading C:\Users\PC.julia\v0.6\NLopt\deps\build.jl, in expression starting on line 56
`

@programistawpf
Copy link

And more:
`julia> Pkg.update()
INFO: Updating METADATA...
INFO: Updating cache of IntervalSets...
INFO: Updating cache of IndirectArrays...
INFO: Updating cache of StatPlots...
INFO: Updating cache of OnlineStatsBase...
INFO: Updating cache of MbedTLS...
INFO: Updating cache of TableTraits...
INFO: Updating cache of FFTW...
INFO: Updating cache of Compat...
INFO: Updating cache of MemPool...
INFO: Updating Plots master... 7c257a09 → 047a13a8
INFO: Package PyPlot: skipping update (pinned)...
INFO: Computing changes...
INFO: Cloning cache of BinaryProvider from https://github.com/JuliaPackaging/BinaryProvider.jl.git
INFO: Upgrading AbstractFFTs: v0.3.0 => v0.3.1
INFO: Installing BinaryProvider v0.2.5
INFO: Upgrading Compat: v0.59.0 => v0.60.0
INFO: Upgrading IndirectArrays: v0.4.0 => v0.4.1
INFO: Upgrading IntervalSets: v0.1.1 => v0.2.0
INFO: Upgrading MbedTLS: v0.5.6 => v0.5.8
INFO: Upgrading MemPool: v0.0.6 => v0.0.7
INFO: Upgrading OnlineStatsBase: v0.6.0 => v0.6.1
INFO: Upgrading StatPlots: v0.7.0 => v0.7.1
INFO: Upgrading TableTraits: v0.1.0 => v0.2.0
INFO: Building MbedTLS
Info: Downloading https://github.com/quinnj/MbedTLSBuilder/releases/download/v0.6/MbedTLS.x86_64-w64-mingw32.tar.gz to
:\Users\PC.julia\v0.6\MbedTLS\deps\usr\downloads\MbedTLS.x86_64-w64-mingw32.tar.gz...
Exception setting "SecurityProtocol": "Cannot convert null to type "System.Net.SecurityProtocolType" due to invalid en
meration values. Specify one of the following enumeration values and try again. The possible enumeration values are "S
l3, Tls"."
At line:1 char:35

  • [System.Net.ServicePointManager]:: <<<< SecurityProtocol =
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

Exception calling "DownloadFile" with "2" argument(s): "Po?Yczenie podstawowe zosta?o zako?one: WystYpi? nieoczekiwan
y b?Yd przy wysy?aniu."
At line:4 char:24

===================================================[ ERROR: MbedTLS ]=================================================

LoadError: Could not download https://github.com/quinnj/MbedTLSBuilder/releases/download/v0.6/MbedTLS.x86_64-w64-mingw
.tar.gz to C:\Users\PC.julia\v0.6\MbedTLS\deps\usr\downloads\MbedTLS.x86_64-w64-mingw32.tar.gz
while loading C:\Users\PC.julia\v0.6\MbedTLS\deps\build.jl, in expression starting on line 40

======================================================================================================================

INFO: Building SpecialFunctions
INFO: Building Rmath
INFO: Building Plots

====================================================[ BUILD ERRORS ]==================================================

WARNING: MbedTLS had build errors.

  • packages with build errors remain installed in C:\Users\PC.julia\v0.6
  • build the package(s) and all dependencies with Pkg.build("MbedTLS")
  • build a single package by running its deps/build.jl script

======================================================================================================================

julia>`

@programistawpf
Copy link

On my machine WIN7-64, after reinstaling MS Net.Framewrok 4.7 is better !
Paul

@freakyengine
Copy link

Hey,

Running a freshly installed Win7 Pro 64bit and i encountered the same error as posted by @programistawpf

Installing .NET 4.7, the already mentioned Windows Update, the EasyFix, MS WMF 5.1 and all Securityupdates up to today got it working.

@KristofferC
Copy link
Member

Looks like #26459

@programistawpf
Copy link

I removed this issue, upadte runing, something temporary was!

@IlyaOrson
Copy link

IlyaOrson commented Apr 9, 2018

I am hitting this with two Win 10 machines. Windows 10 already has latest WMF and TLS patch is not available. Windows updates did not help, any ideas?

EDIT: I tried with a linux machine and got a GitError(Code:ECERTIFICATE, Class:SSL, SSL error...) instead. This happens just in a specific network, so it really is a firewall - certificate issue but for some reason the Windows machines show the error related to this issue Class:OS and not the Class:SSL one.

@dieris
Copy link

dieris commented Apr 19, 2018

Same problem as @IlyaOrson on Windows 10:

ERROR: METADATA cannot be updated. Resolve problems manually in C:\Users\...\.julia\v0.6\METADATA.
GitError(Code:ECERTIFICATE, Class:OS, user cancelled certificate check: )

@programistawpf
Copy link

What to do now ? :/ Problem back!
"Cannot convert null to type "System.Net.SecurityProtocolType"

Version 0.6.2 (2017-12-13 18:08 UTC)
Official http://julialang.org/ release
x86_64-w64-mingw32

julia> using HDF5
INFO: Precompiling module Blosc.
ERROR: LoadError: Blosc not installed properly, run Pkg.build("Blosc"), restart Julia and try again
Stacktrace:
[1] error(::String) at .\error.jl:21
[2] include_from_node1(::String) at .\loading.jl:576
[3] include(::String) at .\sysimg.jl:14
[4] anonymous at .<missing>:2
while loading C:\Users\PC.julia\v0.6\Blosc\src\Blosc.jl, in expression starting on line 10
ERROR: Failed to precompile Blosc to C:\Users\PC.julia\lib\v0.6\Blosc.ji.
Stacktrace:
[1] compilecache(::String) at .\loading.jl:710
[2] _require(::Symbol) at .\loading.jl:497
[3] require(::Symbol) at .\loading.jl:405
[4] _include_from_serialized(::String) at .\loading.jl:157
[5] _require_from_serialized(::Int64, ::Symbol, ::String, ::Bool) at .\loading.jl:200
[6] _require_search_from_serialized(::Int64, ::Symbol, ::String, ::Bool) at .\loading.jl:236
[7] _require(::Symbol) at .\loading.jl:441
[8] require(::Symbol) at .\loading.jl:405

julia> Pkg.build("Blosc")
INFO: Building Blosc
Info: Downloading https://github.com/stevengj/BloscBuilder/releases/download/v1.14.2+5/Blosc.x86_64-w64-mingw32.tar
.gz to C:\Users\PC.julia\v0.6\Blosc\deps\usr\downloads\Blosc.x86_64-w64-mingw32.tar.gz...
Exception setting "SecurityProtocol": "Cannot convert null to type "System.Net.SecurityProtocolType" due to invali
d enumeration values. Specify one of the following enumeration values and try again. The possible enumeration valu
es are "Ssl3, Tls"."
At line:1 char:35

  • [System.Net.ServicePointManager]:: <<<< SecurityProtocol =
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

Exception calling "DownloadFile" with "2" argument(s): "Po?Yczenie podstawowe zosta?o zako?one: WystYpi? nieocze
kiwany b?Yd przy wysy?aniu."
At line:4 char:24

@KristofferC
Copy link
Member

#26459

@programistawpf
Copy link

programistawpf commented Apr 27, 2018 via email

@KristofferC
Copy link
Member

You have written four times now with the exact same error message.

And you even fixed it once: #26167 (comment)

@programistawpf
Copy link

programistawpf commented Apr 27, 2018 via email

@maikkirapo
Copy link

I get the same error message when I try to use Julia from Atom:

Press Enter to start Julia.
Starting Julia...
INFO: Precompiling module Atom.
ERROR: LoadError: MbedTLS not installed properly, run Pkg.build("MbedTLS"), restart Julia and try again
Stacktrace:
 [1] error(::String) at .\error.jl:21
 [2] include_from_node1(::String) at .\loading.jl:576
 [3] include(::String) at .\sysimg.jl:14
 [4] anonymous at .\<missing>:2
while loading C:\Users\mra136\.julia\v0.6\MbedTLS\src\MbedTLS.jl, in expression starting on line 47

I have installed the easy fix, but it doesn't help. When I run Pkg.build("MbedTLS") I get the security protocol error.

@andreasnoack
Copy link
Member

@maikkirapo Have you tried the "easy-fix" in mentioned in https://discourse.julialang.org/t/pkg-update-error-base-libgit2-test-fails/9272/11?

@maikkirapo
Copy link

@andreasnoack Yes, I have tried the easy fix like I already mentioned in my previous comment. Now I'm updating my computer to Win10. Let's see if that fixes this problem.

@c42f
Copy link
Member

c42f commented May 21, 2018

I just came across this problem trying to support a windows 7 install of julia 0.6.2. I don't have admin access to that machine so I spent a while trying to find a non-admin workaround. I didn't find one which works with the official julia-0.6.2 release.

However, libgit2 has merged a workaround which - if julia-0.6 was rebuilt against it - shouldn't require the registry entry workaround in the "quick fix": libgit2/libgit2#4550. I believe this should work on any up to date win7 machine.

To summarize the problem for the curious:

  • Pkg uses libgit2, which in turn downloads files using the WinHttp library.
  • The version of libgit2 shipped with julia 0.6.2 doesn't set the TLS version, so it defaults to TLS1.0
  • github disabled TLS1.0 in February, users must upgrade to TLS1.2
  • WinHttp on Windows 7 doesn't enable TLS1.2 by default (and indeed may not support it at all unless the non-registry parts of KB3140245 are installed via windows update?)

The registry changes in KB3140245 won't work for users without admin access because the keys relevant to WinHttp defaults live in HKEY_LOCAL_MACHINE, rather than HKEY_CURRENT_USER. The only non-admin solution looks like rebuilding julia.

@kbouhi
Copy link

kbouhi commented May 23, 2018

@c42f , but wouldn't the build also need the git connection?

@LeoGalPras
Copy link

LeoGalPras commented Jun 8, 2018

I have tried every solution listed here I think, still geet the error, I've tried:

  • .NET 4.7
  • Windows Update
  • Easyfix
  • Manually installing the update for enabling TLS 1.2

Nothing seems to work, the latest WMF is not available for my computer. What could I be missing???
I've checked the value for the registry and seems to be ok 0x00000a00, for TLS 1.1 and TLS 1.2 by default.

@stevengj
Copy link
Member

I just ran into this error with julia 0.6.4 on Windows 7 SP1, on a machine that I don't have admin access on (department laptop). 😢

@anuraglahon16
Copy link

I have done in my Windows 8 and the easy fix didn't run on my system.How can I run Julia in Jupyter notebook now?

@Thuener
Copy link

Thuener commented Oct 10, 2018

This is an important issue for companies. Many still use Windows 7 and Easy Fix solution are no longer supported (https://support.microsoft.com/en-us/help/2970908/how-to-use-microsoft-easy-fix-solutions). With no work around it is impossible to install Julia in this companies.

@c42f
Copy link
Member

c42f commented Oct 11, 2018

This should have been fixed in julia-0.7 by the addition of 0541bca (see #27241).

@Thuener I assume you are stuck on julia-0.6 for now? I think the registry workaround is still possible but you have to do it manually. It's just a couple of keys though so should be doable.

@Thuener
Copy link

Thuener commented Oct 11, 2018

I thought that this issue was also present in 0.7 and 1.0 because in https://julialang.org/downloads/ it is still saying to install easy fix for those versions.

I install 0.7 and 1.0 but still there is issue with TLS(#26459), however this issue I was able to fix installing Microsoft .NET Framework 4.7.1 and Windows Management Framework 3.

@c42f thanks for the help.

@CorentinJ
Copy link

On win7 x64:
I installed the easy fix.
I downloaded the most recent .net update (which I already had).
I reinstalled Julia 0.6.4 and cleared all my packages (users/[user]/.julia folder).

Nothing worked until I installed Windows Management Framework 3 and restarted my computer after the installation. Thank you @Thuener

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libgit2 The libgit2 library or the LibGit2 stdlib module system:windows Affects only Windows
Projects
None yet
Development

No branches or pull requests