You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在macOS 10.14.6上用juliaup安装Julia遇dyld库加载失败错误

问题:macOS 10.14.6通过juliaup安装Julia时触发dyld库加载错误

在macOS 10.14.6(x86_64架构,shell为fish)系统上使用juliaup安装Julia 1.11.5时,出现动态库加载失败错误,核心报错信息:

dyld: Library not loaded: @rpath/libLLVM.dylib
Referenced from: /Users/moe/.julia/juliaup/julia-1.11.5+0.x64.apple.darwin14/libexec/julia/lld
Reason: image not found

完整安装及报错终端输出如下:

moe@Moes-Air ~> curl -fsSL https://install.julialang.org | sh

info: downloading installer
Welcome to Julia!

This will download and install the official Julia Language distribution
and its version manager Juliaup.

Juliaup will be installed into the Juliaup home directory, located at:

  /Users/moe/.juliaup

The julia, juliaup and other commands will be added to
Juliaup's bin directory, located at:

  /Users/moe/.juliaup/bin

This path will then be added to your PATH environment variable by
modifying the profile files located at:

  /Users/moe/.zshrc

Julia will look for a new version of Juliaup itself every 1440 minutes when you start julia.

You can uninstall at any time with juliaup self uninstall and these
changes will be reverted.

✔ Do you want to install with these default configuration choices? · Proceed with installation

Now installing Juliaup
Checking for new Julia versions
Installing Julia 1.11.5+0.x64.apple.darwin14
Checking standard library notarization................................................dyld: Library not loaded: @rpath/libLLVM.dylib
  Referenced from: /Users/moe/.julia/juliaup/julia-1.11.5+0.x64.apple.darwin14/libexec/julia/lld
  Reason: image not found
ERROR: failed process: Process(setenv(`/Users/moe/.julia/juliaup/julia-1.11.5+0.x64.apple.darwin14/libexec/julia/lld -flavor darwin -arch x86_64 -undefined dynamic_lookup -platform_version macos 15.0.1 13.3 '' -dylib -o /Users/moe/.julia/compiled/v1.11/SuiteSparse/jl_OGqL8y -all_load /Users/moe/.julia/compiled/v1.11/SuiteSparse/jl_OY3KKj '' -L/Users/moe/.julia/juliaup/julia-1.11.5+0.x64.apple.darwin14/lib/julia -L/Users/moe/.julia/juliaup/julia-1.11.5+0.x64.apple.darwin14/lib -ljulia -ljulia-internal`,["XPC_FLAGS=0x0", "PATH=/Users/moe/.julia/juliaup/julia-1.11.5+0.x64.apple.darwin14/libexec/julia:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin", "PWD=/Users/moe", "XPC_SERVICE_NAME=0", "TERM_PROGRAM=Apple_Terminal", "SHELL=/usr/local/bin/fish", "DYLD_FALLBACK_LIBRARY_PATH=/Users/moe/.julia/juliaup/julia-1.11.5+0.x64.apple.darwin14/lib/julia:/Users/moe/.julia/juliaup/julia-1.11.5+0.x64.apple.darwin14/lib:/Users/moe/lib:/usr/local/lib:/lib:/usr/lib", "__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0", "TMPDIR=/var/folders/k8/22j493nd0b1625rvg_pcvn980000gn/T/", "LANG=en_US.UTF-8"  …  "JULIA_LOAD_PATH=@stdlib", "_=/var/folders/k8/22j493nd0b1625rvg_pcvn980000gn/T/tmp.e6B8ROqH/juliainstaller", "OPENBLAS_DEFAULT_NUM_THREADS=1", "Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.esg4jQ7bXl/Render", "SECURITYSESSIONID=186a8", "USER=moe", "HOME=/Users/moe", "TERM=xterm-256color", "TERM_PROGRAM_VERSION=421.2", "OPENBLAS_MAIN_FREE=1"]), ProcessSignaled(6)) [0]

Stacktrace:
  [1] pipeline_error
    @ ./process.jl:598 [inlined]
  [2] run(::Cmd, ::Base.DevNull, ::Vararg{Any}; wait::Bool)
    @ Base ./process.jl:513
  [3] run
    @ ./process.jl:510 [inlined]
  [4] link_image (repeats 2 times)
    @ ./linking.jl:166 [inlined]
  [5] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool; flags::Cmd, cacheflags::Base.CacheFlags, reasons::Dict{String, Int64}, loadable_exts::Nothing)
    @ Base ./loading.jl:3085
  [6] (::Base.var"#1110#1111"{Base.PkgId})()
    @ Base ./loading.jl:2579
  [7] mkpidlock(f::Base.var"#1110#1111"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.11.5+0.x64.apple.darwin14/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:95
  [8] #mkpidlock#6
    @ ~/.julia/juliaup/julia-1.11.5+0.x64.apple.darwin14/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:90 [inlined]
  [9] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.11.5+0.x64.apple.darwin14/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:116
 [10] #invokelatest#2
    @ ./essentials.jl:1057 [inlined]
 [11] invokelatest
    @ ./essentials.jl:1052 [inlined]
 [12] maybe_cachefile_lock(f::Base.var"#1110#1111"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base ./loading.jl:3698
 [13] maybe_cachefile_lock
    @ ./loading.jl:3695 [inlined]
 [14] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2565
 [15] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2388
 [16] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [17] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [18] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2375
 [19] macro expansion
    @ ./loading.jl:2314 [inlined]
 [20] macro expansion
    @ ./lock.jl:273 [inlined]
 [21] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2271
 [22] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [23] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [24] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2260
 [25] eval
    @ ./boot.jl:430 [inlined]
 [26] (::var"#1#3")(p::String)
    @ Main ./none:1
 [27] foreach(f::var"#1#3", itr::Vector{String})
    @ Base ./abstractarray.jl:3187
 [28] top-level scope
    @ none:1
failed with exit status: 1.
Configured the default Julia version to be 'release'.
Julia was successfully installed on your system.

解决方法

1. 降级Julia版本到兼容macOS 10.14的分支

Julia 1.11+版本已不再对macOS 10.14提供官方支持,建议切换到1.10.x分支:

  • 安装1.10版本:juliaup add 1.10
  • 设置为默认版本:juliaup default 1.10

2. 手动指定动态库加载路径

在fish shell中临时设置环境变量,让系统定位到libLLVM.dylib:

set -x DYLD_LIBRARY_PATH /Users/moe/.julia/juliaup/julia-1.11.5+0.x64.apple.darwin14/lib/julia:$DYLD_LIBRARY_PATH

若需永久生效,将上述命令添加到~/.config/fish/config.fish文件中。

3. 修改lld程序的rpath配置

使用install_name_tool为lld添加正确的库搜索路径:

install_name_tool -add_rpath /Users/moe/.julia/juliaup/julia-1.11.5+0.x64.apple.darwin14/lib/julia /Users/moe/.julia/juliaup/julia-1.11.5+0.x64.apple.darwin14/libexec/julia/lld

修改后可通过以下命令验证rpath是否添加成功:

otool -L /Users/moe/.julia/juliaup/julia-1.11.5+0.x64.apple.darwin14/libexec/julia/lld

内容的提问来源于stack exchange,提问作者Moe Kayali

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.13 06:24:50