# Error installing package using pkg.julialang.org, error with unpack, 7z.exe

**URL:** <https://discourse.julialang.org/t/error-installing-package-using-pkg-julialang-org-error-with-unpack-7z-exe/46364>\
**Category:** New to Julia\
**Tags:** question, pkg, installation\
**Created:** [September 10, 2020, 8:38am UTC](https://discourse.julialang.org/t/error-installing-package-using-pkg-julialang-org-error-with-unpack-7z-exe/46364 "2020-09-10T08:38:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pedrobtz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pedrobtz/32/17814_2.png) [@pedrobtz](https://discourse.julialang.org/u/pedrobtz)\
**Post date:** [September 10, 2020, 8:38am UTC](https://discourse.julialang.org/t/error-installing-package-using-pkg-julialang-org-error-with-unpack-7z-exe/46364/1 "2020-09-10T08:38:35Z")

</div>

setup: Julia 1.5.1, win 10.

When trying to install packages using server ‘[pkg.julialang.org](http://pkg.julialang.org)’ I am getting error in unpacking download files.

I think the error happens with ‘unpack’ call  
[https://github.com/JuliaLang/Pkg.jl/blob/1e6db49c39be9e95e377d1bc9f1f81de39083af0/src/Operations.jl#L552](https://github.com/JuliaLang/Pkg.jl/blob/1e6db49c39be9e95e377d1bc9f1f81de39083af0/src/Operations.jl#L552)

- Running the below in the manually downloaded file it gives error as well  
`run(`C:/.<Julia>/../libexec/7z.exe x registries.gz -y -so`)`

- Running the below in the win10 cmd line gives “error: unexpected end of archive”, but it seems able to extract most files  
`C:/.<Julia>/../libexec/7z.exe t registries.gz -bso1 > error.txt`

- Unzipping the file manually with winzip.exe works okay.

manually downloaded with  
`curl https://pkg.julialang.org/registry/23338594-aafe-5451-b93e-139f81909106/4849d3c47dcbfac656e78916ffacaedba32612d8 --output registries.gz`

Thanks  
Pedro

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [September 10, 2020, 8:49am UTC](https://discourse.julialang.org/t/error-installing-package-using-pkg-julialang-org-error-with-unpack-7z-exe/46364/2 "2020-09-10T08:49:22Z")

</div>

Which PkgServer are you redirected to if you go to [https://pkg.julialang.org](https://pkg.julialang.org)?

---

<div class="post-metadata">

**Author:** ![pedrobtz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pedrobtz/32/17814_2.png) [@pedrobtz](https://discourse.julialang.org/u/pedrobtz)\
**Post date:** [September 10, 2020, 4:12pm UTC](https://discourse.julialang.org/t/error-installing-package-using-pkg-julialang-org-error-with-unpack-7z-exe/46364/4 "2020-09-10T16:12:30Z")

</div>

I did

```julia
ENV["PATH"] = "<path-to-tar>;" * ENV["PATH"]
ENV["BINARYPROVIDER_COMPRESSION_ENGINE"] = "tar"

```

```julia
Pkg.PlatformEngines.gen_unpack_cmd("./file", "tmp")

```

returns `tar ... -mxzf file -Ctmp` and it fails saying that `gzip: stdin: not in gzip format`

- the ‘registries’ file is saved with ‘.gz’ extension, but seems to be in fact a ‘.tar.’

Thanks

---

<div class="post-metadata">

**Author:** ![pedrobtz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pedrobtz/32/17814_2.png) [@pedrobtz](https://discourse.julialang.org/u/pedrobtz)\
**Post date:** [September 24, 2020, 5:22am UTC](https://discourse.julialang.org/t/error-installing-package-using-pkg-julialang-org-error-with-unpack-7z-exe/46364/5 "2020-09-24T05:22:17Z")

</div>

It is redirecting to [https://eu-central.pkg.julialang.org](https://eu-central.pkg.julialang.org) via a NEXUS proxy caching server.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [September 24, 2020, 8:39am UTC](https://discourse.julialang.org/t/error-installing-package-using-pkg-julialang-org-error-with-unpack-7z-exe/46364/6 "2020-09-24T08:39:54Z")

</div>

Okay. I have no problems with that server. This message:

> [@pedrobtz](#):
>
> gzip: stdin: not in gzip format

suggests that you try to unpack something that isn’t a gzipped tarball so I think the download failed or returned garbage for some reason rather than a problem with the unpacking software.

---

<div class="post-metadata">

**Author:** ![pedrobtz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pedrobtz/32/17814_2.png) [@pedrobtz](https://discourse.julialang.org/u/pedrobtz)\
**Post date:** [October 29, 2020, 9:13am UTC](https://discourse.julialang.org/t/error-installing-package-using-pkg-julialang-org-error-with-unpack-7z-exe/46364/7 "2020-10-29T09:13:37Z")

</div>

It seems to be some error with 7z.exe in Win10.

I performed the following tests:

- download registry with curl from command line

```julia
curl https://pkg.julialang.org/registry/23338594-aafe-5451-b93e-139f81909106/4849d3c47dcbfac656e78916ffacaedba32612d8 --output registries.gz

```

- unpack from command line with

```julia
C:/.<JuliaPath>/../libexec/7z.exe t registries.gz -bso1 > error.txt

```

and 7z gives the “error: unexpected end of archive”.
