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

setup: Julia 1.5.1, win 10.

When trying to install packages using server ‘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

  • 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

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

I did

ENV["PATH"] = "<path-to-tar>;" * ENV["PATH"]
ENV["BINARYPROVIDER_COMPRESSION_ENGINE"] = "tar"
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

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

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

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.

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

I performed the following tests:

  • download registry with curl from command line
curl https://pkg.julialang.org/registry/23338594-aafe-5451-b93e-139f81909106/4849d3c47dcbfac656e78916ffacaedba32612d8 --output registries.gz
  • unpack from command line with
C:/.<JuliaPath>/../libexec/7z.exe t registries.gz -bso1 > error.txt

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