# Trying to install packages on a server that is airgapped - HELP!

**URL:** <https://discourse.julialang.org/t/trying-to-install-packages-on-a-server-that-is-airgapped-help/70970>\
**Category:** New to Julia\
**Tags:** question, package\
**Created:** [November 4, 2021, 5:38pm UTC](https://discourse.julialang.org/t/trying-to-install-packages-on-a-server-that-is-airgapped-help/70970 "2021-11-04T17:38:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![damonhimself](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@damonhimself](https://discourse.julialang.org/u/damonhimself)\
**Post date:** [November 4, 2021, 5:38pm UTC](https://discourse.julialang.org/t/trying-to-install-packages-on-a-server-that-is-airgapped-help/70970/1 "2021-11-04T17:38:58Z")

</div>

We are working to install packages using pkg on a system that is airgapped. We have mirrored roughly 200 github repos locally to a system that we have internal access to. When installing the package, it attempts to pull artifacts that are located in the Artifact.toml file, which we have modified to a local repo where those tar.gz’s exist. We originally were getting errors about the has mismatch, which we got around by changing the expected SHA hash in the toml file, and now are getting a new error. Not sure where to go with this:

```julia
julia> Pkg.add(url="http://internal.server.com/user/Lz4_jll.jl.git")
    Updating git-repo `http://internal.server.com/user/Lz4_jll.jl.git`
    Updating registry at `~/.julia/registries/General`
    Updating git-repo `http://internal.server.com/user/JuliaRegistries.git`
┌ Warning: Some registries failed to update:
│ — /home/userid/.julia/registries/General — failed to fetch from repo
└ @ Pkg.Types /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Types.jl:1246
   Resolving package versions...
  Downloaded artifact: Lz4
 Downloading artifact: Lz4
ERROR: /tmp/jl_yebkcZ-download.gz
Can not open the file as archive
  Downloaded artifact: Lz4
ERROR: Unable to automatically install 'Lz4' from '/home/userid/.julia/packages/Lz4_jll/FzK2S/Artifacts.toml'
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] ensure_artifact_installed(name::String, meta::Dict{String, Any}, artifacts_toml::String; platform::Base.BinaryPlatforms.Platform, verbose::Bool, quiet_download::Bool, io::Base.TTY)
    @ Pkg.Artifacts /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Artifacts.jl:445
  [3] ensure_all_artifacts_installed(artifacts_toml::String; platform::Base.BinaryPlatforms.Platform, pkg_uuid::Nothing, include_lazy::Bool, verbose::Bool, quiet_download::Bool, io::Base.TTY)
    @ Pkg.Artifacts /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Artifacts.jl:510
  [4] download_artifacts(ctx::Pkg.Types.Context, pkg_roots::Vector{String}; platform::Base.BinaryPlatforms.Platform, verbose::Bool, io::Base.TTY)
    @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Operations.jl:709
  [5] download_artifacts(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; platform::Base.BinaryPlatforms.Platform, julia_version::VersionNumber, verbose::Bool, io::Base.TTY)
    @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Operations.jl:686
  [6] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Vector{Base.UUID}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform)
    @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Operations.jl:1241
  [7] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Iterators.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
    @ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:204
  [8] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:80
  [9] add(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:78
 [10] #add#22
    @ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:75 [inlined]
 [11] add
    @ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:75 [inlined]
 [12] add(; name::Nothing, uuid::Nothing, version::Nothing, url::String, rev::Nothing, path::Nothing, mode::Pkg.Types.PackageMode, subdir::Nothing, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:98
 [13] top-level scope
    @ REPL[2]:1

```

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [November 4, 2021, 6:21pm UTC](https://discourse.julialang.org/t/trying-to-install-packages-on-a-server-that-is-airgapped-help/70970/2 "2021-11-04T18:21:51Z")

</div>

Do you have any reasonable content in the downloaded file or does it contain an error message or something like that?

For what it’s worth, if I were to make an airgapped installation I would set up a dedicated package server, let it cache the needed packages/versions and artifacts, then move it past the gap.

---

<div class="post-metadata">

**Author:** ![damonhimself](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@damonhimself](https://discourse.julialang.org/u/damonhimself)\
**Post date:** [November 5, 2021, 4:46pm UTC](https://discourse.julialang.org/t/trying-to-install-packages-on-a-server-that-is-airgapped-help/70970/4 "2021-11-05T16:46:27Z")

</div>

Thanks for looking at this everyone. We found the issue.

---

<div class="post-metadata">

**Author:** ![fyzycyst](https://avatars.discourse-cdn.com/v4/letter/f/5daacb/32.png) [@fyzycyst](https://discourse.julialang.org/u/fyzycyst)\
**Post date:** [November 5, 2021, 6:03pm UTC](https://discourse.julialang.org/t/trying-to-install-packages-on-a-server-that-is-airgapped-help/70970/5 "2021-11-05T18:03:20Z")

</div>

Care to share what the issue was?
