# Problems with CodecZlib

**URL:** <https://discourse.julialang.org/t/problems-with-codeczlib/10124>\
**Category:** General Usage\
**Created:** [April 2, 2018, 8:45pm UTC](https://discourse.julialang.org/t/problems-with-codeczlib/10124 "2018-04-02T20:45:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacobcvt12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jacobcvt12/32/2695_2.png) [@jacobcvt12](https://discourse.julialang.org/u/jacobcvt12)\
**Post date:** [April 2, 2018, 8:45pm UTC](https://discourse.julialang.org/t/problems-with-codeczlib/10124/1 "2018-04-02T20:45:42Z")

</div>

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
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

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

```

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [April 3, 2018, 5:51am UTC](https://discourse.julialang.org/t/problems-with-codeczlib/10124/2 "2018-04-03T05:51:54Z")

</div>

> [@jacobcvt12](#):
>
> `Pkg.build("CodecZlib")`

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.

---

<div class="post-metadata">

**Author:** ![jacobcvt12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jacobcvt12/32/2695_2.png) [@jacobcvt12](https://discourse.julialang.org/u/jacobcvt12)\
**Post date:** [April 3, 2018, 2:04pm UTC](https://discourse.julialang.org/t/problems-with-codeczlib/10124/3 "2018-04-03T14:04:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jacobcvt12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jacobcvt12/32/2695_2.png) [@jacobcvt12](https://discourse.julialang.org/u/jacobcvt12)\
**Post date:** [April 3, 2018, 2:18pm UTC](https://discourse.julialang.org/t/problems-with-codeczlib/10124/4 "2018-04-03T14:18:25Z")

</div>

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

[https://github.com/bicycle1885/CodecZlib.jl/issues/18](https://github.com/bicycle1885/CodecZlib.jl/issues/18)

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [April 3, 2018, 3:24pm UTC](https://discourse.julialang.org/t/problems-with-codeczlib/10124/5 "2018-04-03T15:24:13Z")

</div>

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](https://support.microsoft.com/en-us/help/3140245/update-to-enable-tls-1-1-and-tls-1-2-as-a-default-secure-protocols-in).

---

<div class="post-metadata">

**Author:** ![Rudi79](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rudi79/32/3884_2.png) [@Rudi79](https://discourse.julialang.org/u/Rudi79)\
**Post date:** [April 3, 2018, 4:29pm UTC](https://discourse.julialang.org/t/problems-with-codeczlib/10124/6 "2018-04-03T16:29:35Z")

</div>

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](https://github.com/JuliaLang/julia/issues/26459#issuecomment-373117374) for reference  
I hope that helps.

---

<div class="post-metadata">

**Author:** ![jacobcvt12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jacobcvt12/32/2695_2.png) [@jacobcvt12](https://discourse.julialang.org/u/jacobcvt12)\
**Post date:** [April 3, 2018, 9:15pm UTC](https://discourse.julialang.org/t/problems-with-codeczlib/10124/7 "2018-04-03T21:15:49Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jacobcvt12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jacobcvt12/32/2695_2.png) [@jacobcvt12](https://discourse.julialang.org/u/jacobcvt12)\
**Post date:** [April 4, 2018, 1:44pm UTC](https://discourse.julialang.org/t/problems-with-codeczlib/10124/8 "2018-04-04T13:44:38Z")

</div>

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`.
