Error in Pkg.update()

What’s wrong with this problem?

julia> using Pkg

julia> Pkg.update()
    Updating registry at `~/.julia/registries/General.toml`
┌ Warning: could not download https://pkg.julialang.org/registries
│   exception = Connection timed out after 30003 milliseconds while requesting https://pkg.julialang.org/registries
└ @ Pkg.Registry /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.7/Pkg/src/Registry/Registry.jl:82

The problem is solved. It is the problem of network.

If you’re in mainland China, you can target to the mirror servers

For instance, downloading from BFSU server would be blazingly fast by setting the environment variable:

julia> ENV["JULIA_PKG_SERVER"] = "https://mirrors.bfsu.edu.cn/julia"

More information can be found in Julia PkgServer 镜像服务及镜像站索引 - 库的安装及使用 - Julia中文社区

Thanks very much. It works wery well.