简体   繁体   English

在 Mac 的命令行上使用“wget”时,如何修复“dyld:库未加载”?

[英]How do I fix "dyld: Library not loaded" when using "wget" on a command line for the Mac?

I'm using Mac OS Big Sur (v 11.4).我正在使用 Mac OS Big Sur (v 11.4)。 Wehn I try and use "wget" on the command line I get this Wehn 我尝试在命令行上使用“wget”,我得到了这个

$ wget http://localhost:8000/user/testuser
dyld: Library not loaded: /usr/local/opt/nettle/lib/libnettle.6.dylib
  Referenced from: /usr/local/bin/wget
  Reason: image not found
Abort trap: 6

Even after running "brew install wget" and restarting my machine, I get the above error.即使在运行“brew install wget”并重新启动我的机器后,我也会收到上述错误。 How do I get "wget" to run normally?如何让“wget”正常运行? This is the path where wget is installed...这是安装 wget 的路径...

$ which wget
/usr/local/bin/wget

Edit: In response to the answer given, here is the output...编辑:针对给出的答案,这里是 output...

$ brew install homebrew/core/wget
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 6 taps (phinze/cask, homebrew/core, homebrew/cask, homebrew/services, pivotal/tap and ethereum/ethereum).
==> New Formulae
airspyhf              cargo-llvm-lines      cilium-cli            f2                    h2c
basis_universal       cargo-outdated        datree                fst                   vite
bubblewrap            chrpath               esbuild               go@1.16               vue-cli
==> Updated Formulae
Updated 883 formulae.
==> Deleted Formulae
procyon-decompiler
==> New Casks
infra             infra             mimestream        mimestream        sigmaos           sigmaos
==> Updated Casks
Updated 292 casks.
==> Deleted Casks
agfeo-dashboard                                         macintosh-explorer
agfeo-dashboard                                         macintosh-explorer
axe-electrum                                            modulair
axe-electrum                                            modulair
boonzi                                                  noraswitch
boonzi                                                  noraswitch
colormunki-photo                                        obyte
colormunki-photo                                        obyte
dnagedcom                                               playnow
dnagedcom                                               playnow
dragthing                                               plecs-standalone
dragthing                                               plecs-standalone
eaccess                                                 privatus
eaccess                                                 privatus
elpki                                                   pro-fit
elpki                                                   pro-fit
finisher-fluxx                                          qtum
finisher-fluxx                                          qtum
finisher-micro                                          qyooo
finisher-micro                                          qyooo
finisher-neo                                            s3stat-setup
finisher-neo                                            s3stat-setup
flow-e                                                  scrooo
flow-e                                                  scrooo
fluxcenter                                              simplelink-msp432e4-sdk
fluxcenter                                              simplelink-msp432e4-sdk
fm3-edit                                                stageplotpro
fm3-edit                                                stageplotpro
imarisviewer                                            tbs-studio
imarisviewer                                            tbs-studio
instant-articles-builder                                thetube
instant-articles-builder                                thetube
instasizer                                              unity-appletv-support-for-editor
instasizer                                              unity-appletv-support-for-editor
jabt-flow                                               unity-linux-il2cpp-support-for-editor
jabt-flow                                               unity-linux-il2cpp-support-for-editor
jidusm                                                  unity-macos-il2cpp-support-for-editor
jidusm                                                  unity-macos-il2cpp-support-for-editor
lightwright                                             wanna
lightwright                                             wanna
locklizard-safeguard-viewer                             zbuc-imgur
locklizard-safeguard-viewer                             zbuc-imgur

==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/manifests/1.1.1l
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/blobs/sha256:ff8b2a965c680b4d9baccd60e799d0989e7dc
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:ff8b2a965c680b4d9baccd60e7
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/wget/manifests/1.21.1_1
Already downloaded: /Users/davea/Library/Caches/Homebrew/downloads/44061bb7a2f7bbbbbddd0901da6885f571bb53671d2ef9f3b29faa13cdc50ac7--wget-1.21.1_1.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:307217b813330eda365570d7540aa2da69c678b6c4b7
Already downloaded: /Users/davea/Library/Caches/Homebrew/downloads/2229e2908e6815b9ceac4ac5af316c49215750a1c6d0bdc10b3946b273ee648d--wget--1.21.1_1.big_sur.bottle.tar.gz
==> Installing dependencies for wget: openssl@1.1
==> Installing wget dependency: openssl@1.1
==> Pouring openssl@1.1--1.1.1l.big_sur.bottle.tar.gz
Error: Directory not empty @ dir_s_rmdir - /usr/local/opt/openssl

That's interesting.那很有意思。 wget from homebrew-core, the default package repo for Homebrew, doesn't depend on nettle at all.来自 homebrew-core 的wget是 Homebrew 的默认包存储库,根本不依赖于nettle

Where did your get wget installed from?你从哪里安装wget Uninstall wget and reinstall it back from the default pkg repo.卸载 wget 并从默认的 pkg 存储库重新安装它。

brew uninstall -f wget
# tell brew to get wget from homebrew-core explicitly
brew install homebrew/core/wget

Don't know if you managed to fix this, but I had a similar issue, found fix here: https://github.com/Homebrew/discussions/discussions/3920不知道你是否设法解决了这个问题,但我有一个类似的问题,在这里找到了解决办法: https://github.com/Homebrew/discussions/discussions/3920

brew reinstall z3

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 dyld:库未加载运行命令 - dyld: Library not loaded running command 如何为命令行命令设置别名? (苹果) - How do I alias a command line command? (Mac) 如何在Mac OSX命令行中使用正则表达式(或类似正则表达式的表达式)一次打开多个图像文件? - How do I open multiple image files at once using regex (or regex-like) expressions in the Mac OSX command line? 如何在Mac中使用命令行显示窗口 - How to show window using command line in Mac wget在Windows命令行上 - wget on Windows command line 如何从命令行启动Selenium IDE并加载特定的测试用例? - How do I launch the Selenium IDE from the command line with a specific test case loaded? 如果不使用php.ini文件,如何让PHP命令行使用它? - How do I get PHP command line to use a php.ini file when it is not using one? 从命令行使用 OpenSCAD 时如何指定网格参数? - How do I specify mesh parameters when using OpenSCAD from the Command Line? 当从命令行使用它时,如何让依赖项将依赖项复制到lib目录? - How do I get Ivy to copy the dependencies to the lib directory when using it from the command line? 我怎么知道命令行中的任务何时完成? - How do I know when the task from command line is finished?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM