# Error building \`GR\`

**URL:** <https://discourse.julialang.org/t/error-building-gr/41489>\
**Category:** General Usage\
**Created:** [June 16, 2020, 2:31am UTC](https://discourse.julialang.org/t/error-building-gr/41489 "2020-06-16T02:31:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jkwwwwow](https://avatars.discourse-cdn.com/v4/letter/j/ecb155/32.png) [@jkwwwwow](https://discourse.julialang.org/u/jkwwwwow)\
**Post date:** [June 16, 2020, 2:31am UTC](https://discourse.julialang.org/t/error-building-gr/41489/1 "2020-06-16T02:31:55Z")

</div>

I met a building error when I tried to add a package in [here](https://github.com/mexsser/POMDPIDMModel.jl):

```julia
Error: Error building `GR`: 
│ 
│ gzip: stdin: unexpected end of file
│ tar: 归档文件中异常的 EOF
│ tar: 归档文件中异常的 EOF
│ tar: Error is not recoverable: exiting now
│ [ Info: Downloading pre-compiled GR 0.50.0 Ubuntu binary
│ ┌ Error: Download failed: curl: (52) Empty reply from server
│ └ @ Base download.jl:43
│ ┌ Error: Download failed: curl: (56) OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104
│ └ @ Base download.jl:43
│ [ Info: Using insecure connection
│ ┌ Error: Download failed: curl: (56) Recv failure: 连接超时
│ └ @ Base download.jl:43
│ [ Info: Cannot download GR run-time
│ ERROR: LoadError: failed process: Process(`tar xzf downloads/gr-0.50.0-Ubuntu-x86_64.tar.gz`, ProcessExited(2)) [2]
│ 
│ Stacktrace:
│ [1] pipeline_error at ./process.jl:525 [inlined]
│ [2] run(::Cmd; wait::Bool) at ./process.jl:440
│ [3] run(::Cmd) at ./process.jl:438
│ [4] top-level scope at /home/jkwwwwow/.julia/packages/GR/Atztx/deps/build.jl:134
│ [5] include(::String) at ./client.jl:439
│ [6] top-level scope at none:5
│ in expression starting at /home/jkwwwwow/.julia/packages/GR/Atztx/deps/build.jl:74
└ @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Operations.jl:899

```

Any idea for this?

---

<div class="post-metadata">

**Author:** ![jheinen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jheinen/32/2787_2.png) [@jheinen](https://discourse.julialang.org/u/jheinen)\
**Post date:** [June 16, 2020, 7:19am UTC](https://discourse.julialang.org/t/error-building-gr/41489/2 "2020-06-16T07:19:59Z")

</div>

The `download()` failed, although there is a fallback. Your system is probably not allowed to download from GH or our download server. Are there any firewall restrictions at your site?

What kind of system are you using (from which country)?

---

<div class="post-metadata">

**Author:** ![jkwwwwow](https://avatars.discourse-cdn.com/v4/letter/j/ecb155/32.png) [@jkwwwwow](https://discourse.julialang.org/u/jkwwwwow)\
**Post date:** [June 16, 2020, 8:27am UTC](https://discourse.julialang.org/t/error-building-gr/41489/3 "2020-06-16T08:27:05Z")

</div>

Yes, I come from China, and there are firewall restrictions. But I have solved the firewall problem through a proxy.  
The current situation is that when I use the proxy, I can install the GR package normally, but I cannot install the POMDPIDMModel package (since I am trying to run [the program here](https://github.com/mexsser/POMDPIDMModel.jl), this package is what I really need, and installing the GR package is because the POMDPIDMModel package requires it):

```julia
julia> using Pkg; Pkg.build("POMDPIDMModel")
   Building Conda ────────→ `~/.julia/packages/Conda/3rPhK/deps/build.log`
   Building PyCall ───────→ `~/.julia/packages/PyCall/zqDXB/deps/build.log`
   Building Geo ──────────→ `~/.julia/dev/Geo/deps/build.log`
   Building QMDP ─────────→ `~/.julia/packages/QMDP/LiM5S/deps/build.log`
   Building GR ───────────→ `~/.julia/packages/GR/Atztx/deps/build.log`
   Building Plots ────────→ `~/.julia/packages/Plots/sbXPh/deps/build.log`
   Building POMDPIDMModel → `~/.julia/packages/POMDPIDMModel/LoQFH/deps/build.log`
┌ Error: Error building `POMDPIDMModel`: 
│ Updating registry at `~/.julia/registries/General`
│ ┌ Warning: could not download https://mirrors.bfsu.edu.cn/julia/static/registries
│ └ @ Pkg.Types /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Types.jl:889
│ Updating registry at `~/.julia/registries/JuliaPOMDP`
│ Updating git-repo `https://github.com/JuliaPOMDP/Registry`
│ ┌ Warning: Some registries failed to update:
│ │ — /home/jkwwwwow/.julia/registries/JuliaPOMDP — failed to fetch from repo
│ └ @ Pkg.Types /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Types.jl:1131
│ Resolving package versions...
│ Updating `/tmp/jl_zt40co/Project.toml`
│ [no changes]
│ Updating `/tmp/jl_zt40co/Manifest.toml`
│ [no changes]
│ Cloning registry from "https://github.com/JuliaPOMDP/Registry"
│ ERROR: LoadError: failed to clone from https://github.com/JuliaPOMDP/Registry, error: GitError(Code:ERROR, Class:Net, unrecognized URL prefix)
│ Stacktrace:
│ [1] pkgerror(::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Types.jl:53
│ [2] clone(::Pkg.Types.Context, ::String, ::String; header::String, credentials::Nothing, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/GitTools.jl:151
│ [3] (::Pkg.Types.var"#89#92"{Pkg.Types.Context,String,Pkg.Types.RegistrySpec})(::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Types.jl:939
│ [4] mktempdir(::Pkg.Types.var"#89#92"{Pkg.Types.Context,String,Pkg.Types.RegistrySpec}, ::String; prefix::String) at ./file.jl:682
│ [5] mktempdir at ./file.jl:680 [inlined] (repeats 2 times)
│ [6] clone_or_cp_registries(::Pkg.Types.Context, ::Array{Pkg.Types.RegistrySpec,1}, ::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Types.jl:920
│ [7] clone_or_cp_registries at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Types.jl:914 [inlined]
│ [8] #add#6 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Registry.jl:29 [inlined]
│ [9] add at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Registry.jl:28 [inlined]
│ [10] #add#5 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Registry.jl:26 [inlined]
│ [11] add(::Array{Pkg.Types.RegistrySpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Registry.jl:26
│ [12] do_cmd!(::Pkg.REPLMode.Command, ::Pkg.REPLMode.MiniREPL) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/REPLMode/REPLMode.jl:402
│ [13] do_cmd(::Pkg.REPLMode.MiniREPL, ::String; do_rethrow::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/REPLMode/REPLMode.jl:380
│ [14] #add_registry#24 at /home/jkwwwwow/.julia/packages/POMDPs/0djkf/src/utils.jl:23 [inlined]
│ [15] add_registry() at /home/jkwwwwow/.julia/packages/POMDPs/0djkf/src/utils.jl:19
│ [16] top-level scope at /home/jkwwwwow/.julia/packages/POMDPIDMModel/LoQFH/deps/build.jl:4
│ [17] include(::String) at ./client.jl:439
│ [18] top-level scope at none:5
│ in expression starting at /home/jkwwwwow/.julia/packages/POMDPIDMModel/LoQFH/deps/build.jl:4
│ caused by [exception 1]
│ GitError(Code:ERROR, Class:Net, unrecognized URL prefix)
│ Stacktrace:
│ [1] macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/LibGit2/src/error.jl:101 [inlined]
│ [2] clone(::SubString{String}, ::String, ::LibGit2.CloneOptions) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/LibGit2/src/repository.jl:459
│ [3] clone(::SubString{String}, ::String; branch::String, isbare::Bool, remote_cb::Ptr{Nothing}, credentials::LibGit2.CachedCredentials, callbacks::Dict{Symbol,Tuple{Ptr{Nothing},Any}}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/LibGit2/src/LibGit2.jl:580
│ [4] clone(::Pkg.Types.Context, ::String, ::String; header::String, credentials::Nothing, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/GitTools.jl:143
│ [5] (::Pkg.Types.var"#89#92"{Pkg.Types.Context,String,Pkg.Types.RegistrySpec})(::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Types.jl:939
│ [6] mktempdir(::Pkg.Types.var"#89#92"{Pkg.Types.Context,String,Pkg.Types.RegistrySpec}, ::String; prefix::String) at ./file.jl:682
│ [7] mktempdir at ./file.jl:680 [inlined] (repeats 2 times)
│ [8] clone_or_cp_registries(::Pkg.Types.Context, ::Array{Pkg.Types.RegistrySpec,1}, ::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Types.jl:920
│ [9] clone_or_cp_registries at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Types.jl:914 [inlined]
│ [10] #add#6 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Registry.jl:29 [inlined]
│ [11] add at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Registry.jl:28 [inlined]
│ [12] #add#5 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Registry.jl:26 [inlined]
│ [13] add(::Array{Pkg.Types.RegistrySpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Registry.jl:26
│ [14] do_cmd!(::Pkg.REPLMode.Command, ::Pkg.REPLMode.MiniREPL) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/REPLMode/REPLMode.jl:402
│ [15] do_cmd(::Pkg.REPLMode.MiniREPL, ::String; do_rethrow::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/REPLMode/REPLMode.jl:380
│ [16] #add_registry#24 at /home/jkwwwwow/.julia/packages/POMDPs/0djkf/src/utils.jl:23 [inlined]
│ [17] add_registry() at /home/jkwwwwow/.julia/packages/POMDPs/0djkf/src/utils.jl:19
│ [18] top-level scope at /home/jkwwwwow/.julia/packages/POMDPIDMModel/LoQFH/deps/build.jl:4
│ [19] include(::String) at ./client.jl:439
│ [20] top-level scope at none:5

```

I use ubuntu16.04, and the Julia version is 1.4.2.  
Any idea for this situation?  
@jheinen

---

<div class="post-metadata">

**Author:** ![jkwwwwow](https://avatars.discourse-cdn.com/v4/letter/j/ecb155/32.png) [@jkwwwwow](https://discourse.julialang.org/u/jkwwwwow)\
**Post date:** [June 16, 2020, 12:29pm UTC](https://discourse.julialang.org/t/error-building-gr/41489/4 "2020-06-16T12:29:51Z")

</div>

This problem has been solved by setting the proxy correctly (I made some mistakes before setting the proxy).
