Julia / Installation errors

Causes and fixes for Julia installation errors

Common errors when installing Julia and adding packages with Pkg, listed by exact message, each with its cause and fix.

Short answer

Julia packages download from the official package server and GitHub, which some networks and corporate proxies block, and Julia from Linux distribution repositories may ship broken dependencies, so Pkg.add fails with all kinds of GitError.

Setting up your environment this way avoids most errors on this page.

PracticeWhat happens if you skip it
Install Julia with the official juliaup (Microsoft Store or winget on Windows, curl -fsSL https://install.julialang.org | sh on macOS and Linux), not a distribution package.Distribution builds of Julia may ship a broken libgit2, and package installs fail with GitError.
On networks where the package server is slow, set JULIA_PKG_SERVER before starting Julia, for example export JULIA_PKG_SERVER=https://mirrors.tuna.tsinghua.edu.cn/julia.Registry and package downloads time out or fail with could not download.
Create a separate environment per project with ]activate . in the project folder.Package versions from different projects constrain each other and you get Unsatisfiable requirements.
Use Julia 1.7 or later.Older versions update the registry with git, which firewalls block, causing failed to read data.
For packages that need external software (such as Gurobi.jl), install that software first as the package describes.Precompilation fails with PkgPrecompileError because a program or library is missing.

Troubleshooting by error message

Find your exact error message. Each entry gives the cause, the fix, and what may come up after the fix.

GitError(Code:ERROR, Class:Net, curl error: Could not resolve host: github.com

Cause: Your machine cannot resolve github.com, typical on restricted networks or networks that need a proxy.

Fix: Set JULIA_PKG_SERVER to use a package server or mirror, restart Julia and add the package again; set HTTPS_PROXY if you need a proxy.

What may come next: Even with a mirror, some packages download extra files from GitHub at build time, which the mirror does not cover.

GitError(Code:ERROR, Class:OS, failed to read data: The server returned an invalid or unrecognized response

Cause: A firewall or security software is intercepting Julia's HTTPS connection to GitHub.

Fix: Retry on another network, such as a phone hotspot; upgrade to Julia 1.7 or later, which downloads the registry from the package server instead of git.

Your Julia is built with a SSL/TLS engine that libgit2 doesn't know how to configure

Cause: A corporate proxy intercepts HTTPS with a self-signed certificate that Julia does not trust.

Fix: Set JULIA_SSL_CA_ROOTS_PATH to a file containing your company root certificate and restart Julia.

What may come next: The git command line and Julia use separate certificate settings, so fixing one does not fix the other.

GitError(Code:ERROR, Class:Invalid, invalid version 0 on git_proxy_options

Cause: Julia packaged by a Linux distribution repository (for example Manjaro) ships a broken libgit2.

Fix: Add export JULIA_PKG_SERVER=pkg.julialang.org to ~/.bashrc; the more reliable fix is to remove the distribution Julia and install the official build with juliaup.

GitError(Code:ENOTFOUND, Class:Odb, object not found - no match for id

Cause: The local General registry is corrupted, often after a power loss or forced quit during an update.

Fix: Delete the ~/.julia/registries/General folder and run Pkg.add again; Julia downloads the registry afresh.

What may come next: If the project Manifest.toml also records broken entries, remove them and run ]resolve.

could not download https://pkg.julialang.org/registries

Cause: Julia cannot reach the official package server.

Fix: Set JULIA_PKG_SERVER to a reachable mirror and restart Julia, or set JULIA_PKG_SERVER="" to clone the registry from GitHub with git instead.

Unsatisfiable requirements detected for package ...

Cause: Two or more packages in the environment require incompatible versions of the same dependency.

Fix: Run ]up to update all packages first; if the conflict remains, remove one of the conflicting packages or create a separate environment for this project.

What may come next: Pinned packages in old projects also cause conflicts; run ]free on them first.

PkgPrecompileError: The following 1 direct dependency failed to precompile:

Cause: The package or one of its dependencies failed to precompile; the real cause is in the error below this line.

Fix: Read the first ERROR below it; if an external program or file is missing (for example Gurobi.jl reporting no deps.jl), install that software first and run Pkg.build("PackageName").

Scientify is a cloud computer with research software installed and AI agents such as Codex and Claude Code built in. Describe what you need in one sentence, for example "solve these Lorenz equations with DifferentialEquations.jl and plot the phase-space trajectory", and the agent uses the preinstalled Julia to do the modeling and computation, with no software to install and no code to write.

Compared with installing more on your own computer, the cloud computer already has Julia 1.13.3 and reaches the official package server and GitHub directly, so installing packages needs no mirror, proxy or certificate setup, and runs continue after you close your laptop.

The cloud computer comes with more computing power: CPU and GPU clusters can be called on demand for large-scale scientific computing. Compute is billed by the minutes you actually use, so nothing is wasted.

Cloud computer
4 vCPU · 8 GB
Top configuration, for data processing and small to medium jobs
Callable GPU
96 GB VRAM
Up to an RTX PRO 6000 per GPU; H800 80 GB and up to 8 × A10G also available
Callable CPU
224 cores · 3 TB
Largest spec, for large parallel computations

References

Frequently asked questions

Package installs are slow. What can I do?

Set JULIA_PKG_SERVER to a nearby mirror before starting Julia; this needs Julia 1.4 or later.

Where are Julia packages installed?

By default in ~/.julia in your home folder; JULIA_DEPOT_PATH moves it, and must be set before Julia starts.

Why does the first using of a package take so long?

Julia precompiles a package the first time it loads it; large packages can take minutes, and later loads use the cache.

Do scientific computing in Julia with Scientify without setup

Upload your data, describe the computation, and Scientify runs it on a cloud computer that is already set up. New accounts get a free cloud computer and US$5 in credit.