Problems with CodecZlib

I’m unable to build CodecZlib (required for DataFrames). I get the error below. Any ideas on what I need to do to fix this problem?

julia> Pkg.build("CodecZlib")
INFO: Building CodecZlib
Info: Downloading https://github.com/bicycle1885/ZlibBuilder/releases/downl
oad/v1.0.0/Zlib.x86_64-w64-mingw32.tar.gz to C:\Users\jcarey\.julia\v0.6\Co
decZlib\deps\usr\downloads\Zlib.x86_64-w64-mingw32.tar.gz...
Exception setting "SecurityProtocol": "Cannot convert null to type "System
.Net.SecurityProtocolType" due to invalid enumeration values. Specify one
of the following enumeration values and try again. The possible enumeratio
n values are "Ssl3, Tls"."
At line:1 char:35
+ [System.Net.ServicePointManager]:: <<<< SecurityProtocol =
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyAssignmentException

Exception calling "DownloadFile" with "2" argument(s): "The underlying con
nection was closed: An unexpected error occurred on a send."
At line:4 char:24
+ $webclient.DownloadFile <<<< ("https://github.com/bicycle1885/ZlibBuilde
r/releases/download/v1.0.0/Zlib.x86_64-w64-mingw32.tar.gz", "C:\Users\jcar
ey\.julia\v0.6\CodecZlib\deps\usr\downloads\Zlib.x86_64-w64-mingw32.tar.gz
")
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationExcep
   tion
    + FullyQualifiedErrorId : DotNetMethodException

===========================[ ERROR: CodecZlib ]============================


LoadError: Could not download https://github.com/bicycle1885/ZlibBuilder/re
leases/download/v1.0.0/Zlib.x86_64-w64-mingw32.tar.gz to C:\Users\jcarey\.j
ulia\v0.6\CodecZlib\deps\usr\downloads\Zlib.x86_64-w64-mingw32.tar.gz
while loading C:\Users\jcarey\.julia\v0.6\CodecZlib\deps\build.jl, in expre
ssion starting on line 92

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


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


WARNING: CodecZlib had build errors.

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

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

is the first thing I would try (as suggested by the error), in case it was a one-time network glitch. Otherwise, see if there is an existing issue for CodecZlib, and if not, consider opening one.

Thanks - I have tried repeating the build multiple times, but no changes. I’ll open an issue and follow up here in case anyone experiences the same problem.

2 Likes

For anyone experiencing the same problem, follow the issue here:

https://github.com/bicycle1885/CodecZlib.jl/issues/18

I think you need to apply the easy fix as shown in Update to enable TLS 1.1 and TLS 1.2 as default secure protocols in WinHTTP in Windows.

Installing the easy fix did not solve the problem for me. I had to manually install Powershell 3.
See https://github.com/JuliaLang/julia/issues/26459#issuecomment-373117374 for reference
I hope that helps.

1 Like

Thanks for your replies. @kristoffer.carlsson - I have already installed the easy fix.

@Rudi79 that seems to be the problem. I’ll follow up once I’ve convinced my company to upgrade my powershell.

For those of us who are forced to use windows on a corporate computer, is there a “nicer” way to get around this problem? For example, could this download method check for power shell version 3 or higher, and if not available proceed with some alternative download method? I am pretty ignorant about network protocols, but is it possible for download to be written in native Julia?

The problem was with the version of Powershell. I had version 2, and after installing Powershell 3 as @Rudi79 recommended, I was able to build CodecZlib.

2 Likes