安装Plots一直报错,可能是系统环境有问题,来求助


下载了从1.6.6版本到1.7.3,再到最新的1.8.0版,均出现上述问题,所以怀疑是不是电脑本身环境出现问题,请教下各位

1 个赞

已经add Plots过了,我感觉是电脑环境出问题了,但那方面不是很懂,原来安装Plots遇到的问题就是下载慢经常安装失败,挂梯子后安装Plots基本都能成功。我这边安装安装包一般采用步骤是add package,然后build package

似乎是libgio挂了,我看看,

也是第一次碰到这个问题,以前出问题直接安装一个新版本的julia,安装包重新下载就好了;可能也有我原来版本没卸载干净的缘故 :joy:不是很懂我都瞎猜的

调用st Plots看看,我能build成功


还是不行,是不是我电脑出大问题了,昨天还好好的来着,尴尬 :sweat_smile:


贴错图了,也是出问题了两本版本的julia我都在试,都出现了这个问题

你是如何两次拼错的?
rm掉重启REPL重装吧

欢迎加入社区。后续问答请尽量减少贴图,Discourse支持Markdown格式,这样方便其他人运行和查错。

我印象中类似的问题在论坛里有很多,你可以搜索一下以前的帖子。

不好意思,没注意规则,感谢提醒,下次一定注意这个问题

同样不行

(@v1.6) pkg> rm Plots
    Updating `~/.julia/environments/v1.6/Project.toml`
  [91a5bcdd] - Plots v1.31.1
    Updating `~/.julia/environments/v1.6/Manifest.toml`
  [79e6a3ab] - Adapt v3.3.3
  [d360d2e6] - ChainRulesCore v1.15.1
  [9e997f8a] - ChangesOfVariables v0.1.3
  [35d6a980] - ColorSchemes v3.19.0
  [3da002f7] - ColorTypes v0.11.4
  [c3611d14] - ColorVectorSpace v0.9.9
  [5ae59095] - Colors v0.12.8
  [34da2185] - Compat v4.1.0
  [d38c429a] - Contour v0.6.1
  [9a962f9c] - DataAPI v1.10.0
  [864edb3b] - DataStructures v0.18.13
  [e2d170a0] - DataValueInterfaces v1.0.0
  [ffbed154] - DocStringExtensions v0.8.6
  [c87230d0] - FFMPEG v0.4.1
  [53c48c17] - FixedPointNumbers v0.8.4
  [59287772] - Formatting v0.4.2
  [28b8d3ca] - GR v0.64.4
  [5c1252a2] - GeometryBasics v0.4.2
  [42e2da0e] - Grisu v1.0.2
  [cd3eb016] - HTTP v0.9.17
  [83e8ac13] - IniFile v0.5.1
  [3587e190] - InverseFunctions v0.1.7
  [92d709cd] - IrrationalConstants v0.1.1
  [c8e1da08] - IterTools v1.4.0
  [82899510] - IteratorInterfaceExtensions v1.0.0
  [692b3bcd] - JLLWrappers v1.4.1
  [682c06a0] - JSON v0.21.3
  [b964fa9f] - LaTeXStrings v1.3.0
  [23fbe1c1] - Latexify v0.15.15
  [2ab3a3ac] - LogExpFunctions v0.3.15
  [1914dd2f] - MacroTools v0.5.9
  [739be429] - MbedTLS v1.1.0
  [442fdcdd] - Measures v0.3.1
  [e1d29d7a] - Missings v1.0.2
  [77ba4419] - NaNMath v1.0.0
  [bac558e1] - OrderedCollections v1.4.1
  [69de0a69] - Parsers v2.3.2
  [ccf2f8ad] - PlotThemes v3.0.0
  [995b91a9] - PlotUtils v1.3.0
  [91a5bcdd] - Plots v1.31.1
  [21216c6a] - Preferences v1.3.0
  [3cdcf5f2] - RecipesBase v1.2.1
  [01d81517] - RecipesPipeline v0.5.2
  [189a3867] - Reexport v1.2.2
  [05181044] - RelocatableFolders v0.1.3
  [ae029012] - Requires v1.3.0
  [6c6a2e73] - Scratch v1.1.0
  [992d4aef] - Showoff v1.0.3
  [a2af1166] - SortingAlgorithms v1.0.1
  [276daf66] - SpecialFunctions v2.1.7
  [90137ffa] - StaticArrays v1.5.0
  [1e83bf80] - StaticArraysCore v1.0.1
  [82ae8749] - StatsAPI v1.4.0
  [2913bbd2] - StatsBase v0.33.18
  [09ab397b] - StructArrays v0.6.11
  [3783bdb8] - TableTraits v1.0.1
  [bd369af6] - Tables v1.7.0
  [62fd8b95] - TensorCore v0.1.1
  [5c2747f8] - URIs v1.3.0
  [1cfade01] - UnicodeFun v0.4.1
  [41fe7b60] - Unzip v0.1.2
  [6e34b625] - Bzip2_jll v1.0.8+0
  [83423d85] - Cairo_jll v1.16.1+1
  [5ae413db] - EarCut_jll v2.2.3+0
  [2e619515] - Expat_jll v2.4.8+0
  [b22a6f82] - FFMPEG_jll v4.4.0+0
  [a3f928ae] - Fontconfig_jll v2.13.93+0
  [d7e528f0] - FreeType2_jll v2.10.4+0
  [559328eb] - FriBidi_jll v1.0.10+0
  [0656b61e] - GLFW_jll v3.3.6+0
  [d2c73de3] - GR_jll v0.64.4+0
  [78b55507] - Gettext_jll v0.21.0+0
  [7746bdde] - Glib_jll v2.68.3+2
  [3b182d85] - Graphite2_jll v1.3.14+0
  [2e76f6c2] - HarfBuzz_jll v2.8.1+1
  [aacddb02] - JpegTurbo_jll v2.1.2+0
  [c1c5ebd0] - LAME_jll v3.100.1+0
  [88015f11] - LERC_jll v3.0.0+1
  [dd4b983a] - LZO_jll v2.10.1+0
  [e9f186c6] - Libffi_jll v3.2.2+1
  [d4300ac3] - Libgcrypt_jll v1.8.7+0
  [7e76a0d4] - Libglvnd_jll v1.3.0+3
  [7add5ba3] - Libgpg_error_jll v1.42.0+0
  [94ce4f54] - Libiconv_jll v1.16.1+1
  [4b2f31a3] - Libmount_jll v2.35.0+0
  [89763e89] - Libtiff_jll v4.4.0+0
  [38a345b3] - Libuuid_jll v2.36.0+0
  [e7412a2a] - Ogg_jll v1.3.5+1
  [458c3c95] - OpenSSL_jll v1.1.16+0
  [efe28fd5] - OpenSpecFun_jll v0.5.5+0
  [91d4177d] - Opus_jll v1.3.2+0
  [2f80f16e] - PCRE_jll v8.44.0+0
  [30392449] - Pixman_jll v0.40.1+0
  [ea2cea3b] - Qt5Base_jll v5.15.3+1
  [a2964d1f] - Wayland_jll v1.19.0+0
  [2381bf8a] - Wayland_protocols_jll v1.25.0+0
  [02c8fc9c] - XML2_jll v2.9.14+0
  [aed1982a] - XSLT_jll v1.1.34+0
  [4f6342f7] - Xorg_libX11_jll v1.6.9+4
  [0c0b7dd1] - Xorg_libXau_jll v1.0.9+4
  [935fb764] - Xorg_libXcursor_jll v1.2.0+4
  [a3789734] - Xorg_libXdmcp_jll v1.1.3+4
  [1082639a] - Xorg_libXext_jll v1.3.4+4
  [d091e8ba] - Xorg_libXfixes_jll v5.0.3+4
  [a51aa0fd] - Xorg_libXi_jll v1.7.10+4
  [d1454406] - Xorg_libXinerama_jll v1.1.4+4
  [ec84b674] - Xorg_libXrandr_jll v1.5.2+4
  [ea2f1a96] - Xorg_libXrender_jll v0.9.10+4
  [14d82f49] - Xorg_libpthread_stubs_jll v0.1.0+3
  [c7cfdc94] - Xorg_libxcb_jll v1.13.0+3
  [cc61e674] - Xorg_libxkbfile_jll v1.1.0+4
  [12413925] - Xorg_xcb_util_image_jll v0.4.0+1
  [2def613f] - Xorg_xcb_util_jll v0.4.0+1
  [975044d2] - Xorg_xcb_util_keysyms_jll v0.4.0+1
  [0d47668e] - Xorg_xcb_util_renderutil_jll v0.3.9+1
  [c22f9ab0] - Xorg_xcb_util_wm_jll v0.4.1+1
  [35661453] - Xorg_xkbcomp_jll v1.4.2+4
  [33bec58e] - Xorg_xkeyboard_config_jll v2.27.0+4
  [c5fb5394] - Xorg_xtrans_jll v1.4.0+3
  [3161d3a3] - Zstd_jll v1.5.2+0
  [0ac62f75] - libass_jll v0.15.1+0
  [f638f0a6] - libfdk_aac_jll v2.0.2+0
  [b53b4c65] - libpng_jll v1.6.38+0
  [f27f6e37] - libvorbis_jll v1.3.7+1
  [1270edf5] - x264_jll v2021.5.5+0
  [dfaa095f] - x265_jll v3.5.0+0
  [d8fb68d0] - xkbcommon_jll v0.9.1+5
  [0dad84c5] - ArgTools
  [56f22d72] - Artifacts
  [2a0f44e3] - Base64
  [ade2ca70] - Dates
  [8bb1440f] - DelimitedFiles
  [f43a241f] - Downloads
  [b77e0a4c] - InteractiveUtils
  [b27032c2] - LibCURL
  [76f85450] - LibGit2
  [8f399da3] - Libdl
  [37e2e46d] - LinearAlgebra
  [56ddb016] - Logging
  [d6f4376e] - Markdown
  [a63ad114] - Mmap
  [ca575930] - NetworkOptions
  [44cfe95a] - Pkg
  [de0858da] - Printf
  [3fa0cd96] - REPL
  [9a3f8284] - Random
  [ea8e919c] - SHA
  [9e88b42a] - Serialization
  [6462fe0b] - Sockets
  [2f01184e] - SparseArrays
  [10745b16] - Statistics
  [fa267f1f] - TOML
  [a4e569a6] - Tar
  [8dfed614] - Test
  [cf7118a7] - UUIDs
  [4ec0a83e] - Unicode
  [e66e0078] - CompilerSupportLibraries_jll
  [deac9b47] - LibCURL_jll
  [29816b5a] - LibSSH2_jll
  [c8ffd9c3] - MbedTLS_jll
  [14a3606d] - MozillaCACerts_jll
  [05823500] - OpenLibm_jll
  [83775a58] - Zlib_jll
  [8e850ede] - nghttp2_jll
  [3f19e933] - p7zip_jll

(@v1.6) pkg> gc()
ERROR: `gc()` is not a recognized command. Type ? for help with available commands

(@v1.6) pkg> gc
      Active manifest files: 10 found
      Active artifact files: 220 found
      Active scratchspaces: 21 found
     Deleted no artifacts, repos, packages or scratchspaces

(@v1.6) pkg> add Plots
   Resolving package versions...
    Updating `~/.julia/environments/v1.6/Project.toml`
  [91a5bcdd] + Plots v1.31.1
    Updating `~/.julia/environments/v1.6/Manifest.toml`
  [79e6a3ab] + Adapt v3.3.3
  [d360d2e6] + ChainRulesCore v1.15.1
  [9e997f8a] + ChangesOfVariables v0.1.3
  [35d6a980] + ColorSchemes v3.19.0
  [3da002f7] + ColorTypes v0.11.4
  [c3611d14] + ColorVectorSpace v0.9.9
  [5ae59095] + Colors v0.12.8
  [34da2185] + Compat v4.1.0
  [d38c429a] + Contour v0.6.1
  [9a962f9c] + DataAPI v1.10.0
  [864edb3b] + DataStructures v0.18.13
  [e2d170a0] + DataValueInterfaces v1.0.0
  [ffbed154] + DocStringExtensions v0.8.6
  [c87230d0] + FFMPEG v0.4.1
  [53c48c17] + FixedPointNumbers v0.8.4
  [59287772] + Formatting v0.4.2
  [28b8d3ca] + GR v0.64.4
  [5c1252a2] + GeometryBasics v0.4.2
  [42e2da0e] + Grisu v1.0.2
  [cd3eb016] + HTTP v0.9.17
  [83e8ac13] + IniFile v0.5.1
  [3587e190] + InverseFunctions v0.1.7
  [92d709cd] + IrrationalConstants v0.1.1
  [c8e1da08] + IterTools v1.4.0
  [82899510] + IteratorInterfaceExtensions v1.0.0
  [692b3bcd] + JLLWrappers v1.4.1
  [682c06a0] + JSON v0.21.3
  [b964fa9f] + LaTeXStrings v1.3.0
  [23fbe1c1] + Latexify v0.15.15
  [2ab3a3ac] + LogExpFunctions v0.3.15
  [1914dd2f] + MacroTools v0.5.9
  [739be429] + MbedTLS v1.1.0
  [442fdcdd] + Measures v0.3.1
  [e1d29d7a] + Missings v1.0.2
  [77ba4419] + NaNMath v1.0.0
  [bac558e1] + OrderedCollections v1.4.1
  [69de0a69] + Parsers v2.3.2
  [ccf2f8ad] + PlotThemes v3.0.0
  [995b91a9] + PlotUtils v1.3.0
  [91a5bcdd] + Plots v1.31.1
  [21216c6a] + Preferences v1.3.0
  [3cdcf5f2] + RecipesBase v1.2.1
  [01d81517] + RecipesPipeline v0.5.2
  [189a3867] + Reexport v1.2.2
  [05181044] + RelocatableFolders v0.1.3
  [ae029012] + Requires v1.3.0
  [6c6a2e73] + Scratch v1.1.0
  [992d4aef] + Showoff v1.0.3
  [a2af1166] + SortingAlgorithms v1.0.1
  [276daf66] + SpecialFunctions v2.1.7
  [90137ffa] + StaticArrays v1.5.0
  [1e83bf80] + StaticArraysCore v1.0.1
  [82ae8749] + StatsAPI v1.4.0
  [2913bbd2] + StatsBase v0.33.18
  [09ab397b] + StructArrays v0.6.11
  [3783bdb8] + TableTraits v1.0.1
  [bd369af6] + Tables v1.7.0
  [62fd8b95] + TensorCore v0.1.1
  [5c2747f8] + URIs v1.3.0
  [1cfade01] + UnicodeFun v0.4.1
  [41fe7b60] + Unzip v0.1.2
  [6e34b625] + Bzip2_jll v1.0.8+0
  [83423d85] + Cairo_jll v1.16.1+1
  [5ae413db] + EarCut_jll v2.2.3+0
  [2e619515] + Expat_jll v2.4.8+0
  [b22a6f82] + FFMPEG_jll v4.4.0+0
  [a3f928ae] + Fontconfig_jll v2.13.93+0
  [d7e528f0] + FreeType2_jll v2.10.4+0
  [559328eb] + FriBidi_jll v1.0.10+0
  [0656b61e] + GLFW_jll v3.3.6+0
  [d2c73de3] + GR_jll v0.64.4+0
  [78b55507] + Gettext_jll v0.21.0+0
  [7746bdde] + Glib_jll v2.68.3+2
  [3b182d85] + Graphite2_jll v1.3.14+0
  [2e76f6c2] + HarfBuzz_jll v2.8.1+1
  [aacddb02] + JpegTurbo_jll v2.1.2+0
  [c1c5ebd0] + LAME_jll v3.100.1+0
  [88015f11] + LERC_jll v3.0.0+1
  [dd4b983a] + LZO_jll v2.10.1+0
  [e9f186c6] + Libffi_jll v3.2.2+1
  [d4300ac3] + Libgcrypt_jll v1.8.7+0
  [7e76a0d4] + Libglvnd_jll v1.3.0+3
  [7add5ba3] + Libgpg_error_jll v1.42.0+0
  [94ce4f54] + Libiconv_jll v1.16.1+1
  [4b2f31a3] + Libmount_jll v2.35.0+0
  [89763e89] + Libtiff_jll v4.4.0+0
  [38a345b3] + Libuuid_jll v2.36.0+0
  [e7412a2a] + Ogg_jll v1.3.5+1
  [458c3c95] + OpenSSL_jll v1.1.16+0
  [efe28fd5] + OpenSpecFun_jll v0.5.5+0
  [91d4177d] + Opus_jll v1.3.2+0
  [2f80f16e] + PCRE_jll v8.44.0+0
  [30392449] + Pixman_jll v0.40.1+0
  [ea2cea3b] + Qt5Base_jll v5.15.3+1
  [a2964d1f] + Wayland_jll v1.19.0+0
  [2381bf8a] + Wayland_protocols_jll v1.25.0+0
  [02c8fc9c] + XML2_jll v2.9.14+0
  [aed1982a] + XSLT_jll v1.1.34+0
  [4f6342f7] + Xorg_libX11_jll v1.6.9+4
  [0c0b7dd1] + Xorg_libXau_jll v1.0.9+4
  [935fb764] + Xorg_libXcursor_jll v1.2.0+4
  [a3789734] + Xorg_libXdmcp_jll v1.1.3+4
  [1082639a] + Xorg_libXext_jll v1.3.4+4
  [d091e8ba] + Xorg_libXfixes_jll v5.0.3+4
  [a51aa0fd] + Xorg_libXi_jll v1.7.10+4
  [d1454406] + Xorg_libXinerama_jll v1.1.4+4
  [ec84b674] + Xorg_libXrandr_jll v1.5.2+4
  [ea2f1a96] + Xorg_libXrender_jll v0.9.10+4
  [14d82f49] + Xorg_libpthread_stubs_jll v0.1.0+3
  [c7cfdc94] + Xorg_libxcb_jll v1.13.0+3
  [cc61e674] + Xorg_libxkbfile_jll v1.1.0+4
  [12413925] + Xorg_xcb_util_image_jll v0.4.0+1
  [2def613f] + Xorg_xcb_util_jll v0.4.0+1
  [975044d2] + Xorg_xcb_util_keysyms_jll v0.4.0+1
  [0d47668e] + Xorg_xcb_util_renderutil_jll v0.3.9+1
  [c22f9ab0] + Xorg_xcb_util_wm_jll v0.4.1+1
  [35661453] + Xorg_xkbcomp_jll v1.4.2+4
  [33bec58e] + Xorg_xkeyboard_config_jll v2.27.0+4
  [c5fb5394] + Xorg_xtrans_jll v1.4.0+3
  [3161d3a3] + Zstd_jll v1.5.2+0
  [0ac62f75] + libass_jll v0.15.1+0
  [f638f0a6] + libfdk_aac_jll v2.0.2+0
  [b53b4c65] + libpng_jll v1.6.38+0
  [f27f6e37] + libvorbis_jll v1.3.7+1
  [1270edf5] + x264_jll v2021.5.5+0
  [dfaa095f] + x265_jll v3.5.0+0
  [d8fb68d0] + xkbcommon_jll v0.9.1+5
  [0dad84c5] + ArgTools
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [8bb1440f] + DelimitedFiles
  [f43a241f] + Downloads
  [b77e0a4c] + InteractiveUtils
  [b27032c2] + LibCURL
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [a63ad114] + Mmap
  [ca575930] + NetworkOptions
  [44cfe95a] + Pkg
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [2f01184e] + SparseArrays
  [10745b16] + Statistics
  [fa267f1f] + TOML
  [a4e569a6] + Tar
  [8dfed614] + Test
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
  [e66e0078] + CompilerSupportLibraries_jll
  [deac9b47] + LibCURL_jll
  [29816b5a] + LibSSH2_jll
  [c8ffd9c3] + MbedTLS_jll
  [14a3606d] + MozillaCACerts_jll
  [05823500] + OpenLibm_jll
  [83775a58] + Zlib_jll
  [8e850ede] + nghttp2_jll
  [3f19e933] + p7zip_jll

(@v1.6) pkg> build Plots
    Building GR → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/c98aea696662d09e215ef7cda5296024a9646c75/build.log`
Precompiling project...
  ✗ Plots
  1 dependency successfully precompiled in 12 seconds (116 already precompiled, 14 skipped during auto due to previous errors)
  1 dependency errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the package

julia> versioninfo()
Julia Version 1.6.6
Commit b8708f954a (2022-03-28 07:17 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.7.0)
  CPU: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)

(@v1.6) pkg> status
      Status `~/.julia/environments/v1.6/Project.toml`
  [91a5bcdd] Plots v1.31.1

julia> using Plots
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
ERROR: LoadError: LoadError: InitError: could not load library "/Users/cjw2436/.julia/artifacts/0d8a52e4899a8c834a65dfb9452798e45ae640a0/lib/libgio-2.0.0.dylib"
dlopen(/Users/cjw2436/.julia/artifacts/0d8a52e4899a8c834a65dfb9452798e45ae640a0/lib/libgio-2.0.0.dylib, 1): image not found
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl ./libdl.jl:114
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl ./libdl.jl:114
  [3] macro expansion
    @ ~/.julia/packages/JLLWrappers/QpMQW/src/products/library_generators.jl:54 [inlined]
  [4] __init__()
    @ Glib_jll ~/.julia/packages/Glib_jll/2OVnY/src/wrappers/x86_64-apple-darwin.jl:17
  [5] _include_from_serialized(path::String, depmods::Vector{Any})
    @ Base ./loading.jl:696
  [6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
    @ Base ./loading.jl:782
  [7] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1020
  [8] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:936
  [9] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:923
 [10] include(mod::Module, _path::String)
    @ Base ./Base.jl:384
 [11] top-level scope
    @ ~/.julia/packages/JLLWrappers/QpMQW/src/toplevel_generators.jl:188
 [12] include
    @ ./Base.jl:384 [inlined]
 [13] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base ./loading.jl:1235
 [14] top-level scope
    @ none:1
 [15] eval
    @ ./boot.jl:360 [inlined]
 [16] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [17] top-level scope
    @ none:1
during initialization of module Glib_jll
in expression starting at /Users/cjw2436/.julia/packages/Cairo_jll/HW4xi/src/wrappers/x86_64-apple-darwin.jl:4
in expression starting at /Users/cjw2436/.julia/packages/Cairo_jll/HW4xi/src/Cairo_jll.jl:2
ERROR: LoadError: LoadError: Failed to precompile Cairo_jll [83423d85-b0ee-5818-9007-b63ccbeb887a] to /Users/cjw2436/.julia/compiled/v1.6/Cairo_jll/jl_jnfwyt.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1385
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1329
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1043
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:936
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:923
  [7] include(mod::Module, _path::String)
    @ Base ./Base.jl:384
  [8] top-level scope
    @ ~/.julia/packages/JLLWrappers/QpMQW/src/toplevel_generators.jl:188
  [9] include
    @ ./Base.jl:384 [inlined]
 [10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base ./loading.jl:1235
 [11] top-level scope
    @ none:1
 [12] eval
    @ ./boot.jl:360 [inlined]
 [13] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [14] top-level scope
    @ none:1
in expression starting at /Users/cjw2436/.julia/packages/HarfBuzz_jll/zavaV/src/wrappers/x86_64-apple-darwin.jl:4
in expression starting at /Users/cjw2436/.julia/packages/HarfBuzz_jll/zavaV/src/HarfBuzz_jll.jl:2
ERROR: LoadError: LoadError: Failed to precompile HarfBuzz_jll [2e76f6c2-a576-52d4-95c1-20adfe4de566] to /Users/cjw2436/.julia/compiled/v1.6/HarfBuzz_jll/jl_ULaECJ.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1385
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1329
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1043
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:936
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:923
  [7] include(mod::Module, _path::String)
    @ Base ./Base.jl:384
  [8] top-level scope
    @ ~/.julia/packages/JLLWrappers/QpMQW/src/toplevel_generators.jl:188
  [9] include
    @ ./Base.jl:384 [inlined]
 [10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base ./loading.jl:1235
 [11] top-level scope
    @ none:1
 [12] eval
    @ ./boot.jl:360 [inlined]
 [13] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [14] top-level scope
    @ none:1
in expression starting at /Users/cjw2436/.julia/packages/libass_jll/SaaQW/src/wrappers/x86_64-apple-darwin.jl:6
in expression starting at /Users/cjw2436/.julia/packages/libass_jll/SaaQW/src/libass_jll.jl:2
ERROR: LoadError: LoadError: Failed to precompile libass_jll [0ac62f75-1d6f-5e53-bd7c-93b484bb37c0] to /Users/cjw2436/.julia/compiled/v1.6/libass_jll/jl_IMMYEm.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1385
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1329
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1043
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:936
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:923
  [7] include(mod::Module, _path::String)
    @ Base ./Base.jl:384
  [8] top-level scope
    @ ~/.julia/packages/JLLWrappers/QpMQW/src/toplevel_generators.jl:188
  [9] include
    @ ./Base.jl:384 [inlined]
 [10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base ./loading.jl:1235
 [11] top-level scope
    @ none:1
 [12] eval
    @ ./boot.jl:360 [inlined]
 [13] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [14] top-level scope
    @ none:1
in expression starting at /Users/cjw2436/.julia/packages/FFMPEG_jll/ECokx/src/wrappers/x86_64-apple-darwin.jl:4
in expression starting at /Users/cjw2436/.julia/packages/FFMPEG_jll/ECokx/src/FFMPEG_jll.jl:2
ERROR: LoadError: Failed to precompile FFMPEG_jll [b22a6f82-2f65-5046-a5b2-351ab43fb4e5] to /Users/cjw2436/.julia/compiled/v1.6/FFMPEG_jll/jl_4InyYb.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1385
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1329
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1043
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:936
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:923
  [7] include
    @ ./Base.jl:384 [inlined]
  [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base ./loading.jl:1235
  [9] top-level scope
    @ none:1
 [10] eval
    @ ./boot.jl:360 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [12] top-level scope
    @ none:1
in expression starting at /Users/cjw2436/.julia/packages/FFMPEG/OUpap/src/FFMPEG.jl:1
ERROR: LoadError: Failed to precompile FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a] to /Users/cjw2436/.julia/compiled/v1.6/FFMPEG/jl_oySaTW.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1385
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1329
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1043
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:936
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:923
  [7] include
    @ ./Base.jl:384 [inlined]
  [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1235
  [9] top-level scope
    @ none:1
 [10] eval
    @ ./boot.jl:360 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [12] top-level scope
    @ none:1
in expression starting at /Users/cjw2436/.julia/packages/Plots/E2187/src/Plots.jl:1
ERROR: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to /Users/cjw2436/.julia/compiled/v1.6/Plots/jl_fJ2mXn.
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1385
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base ./loading.jl:1329
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1043
 [5] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:936
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:923

julia> 

还是感谢您的耐心解答

有可能是libgio与macos的适配问题,可以尝试安装旧的版本 and/or 到仓库反馈

你去/Users/cjw2436/.julia/artifacts/0d8a52e4899a8c834a65dfb9452798e45ae640a0/lib/
看一看是不是有那个 lib,没有的话你可以自己在网上下载对应的 lib放进去。
具体从哪里下载可以检查这几个文件。

~/.julia/packages/JLLWrappers/QpMQW/src/products/library_generators.jl
~/.julia/packages/Glib_jll/2OVnY/src/wrappers/x86_64-apple-darwin.jl
~/.julia/packages/JLLWrappers/QpMQW/src/toplevel_generators.jl

找到了,在这里下

按你这个要求,在您给的链接下载好文件解压后放入了对应lib里去,重新运行

(@v1.8) pkg> instantiate
(@v1.8) pkg> update
(@v1.8) pkg> precompile

后,提示刚才下载的Glib里的文件失效,提示我删除。同样,我也Plots包的issues上找了一些其他人也有类似于此的现象(Issues · JuliaPlots/Plots.jl · GitHub
最后,同样是在Plots包的issues上,我找到了解决方法:
[BUG] Plots with GR on Mac OS stopped working at all · Issue #3800 · JuliaPlots/Plots.jl · GitHub
卸载并重新安装Julia,需要注意的是,安装前需要将原来在系统中被隐藏的“./julia”文件夹所包含的所有文件。具体步骤如下:

  1. 从应用程序中删除 Julia
  2. 删除隐藏的 .julia 文件夹
  3. 正常下载和重新安装 Julia
  4. 为在终端直接启动Julia,在终端输入
  5. 在 MacOS 终端中输入 ‘julia’ 启动 Julia
    “ln -s /Applications/Julia-1.6.app/Contents/Resources/julia/bin/julia /usr/local/bin/julia”,其中“Julia-1.6”中的“1.6”为版本,可根据版本进行相应的修改。
  6. 在终端直接输入“julia”,便可进行所需包的安装,此次安装Plots顺利通过,不会像以前一样报错了:
(@v1.6) pkg> status
      Status `~/.julia/environments/v1.6/Project.toml`
  [587475ba] Flux v0.13.4
  [7073ff75] IJulia v1.23.3
  [86fae568] ImageView v0.11.1
  [916415d5] Images v0.25.2
  [add582a8] MLJ v0.18.4
  [91a5bcdd] Plots v1.31.3
  [c3e4b0f8] Pluto v0.19.9

julia> using Plots

julia> histogram(randn(10000))

julia>