git status给出有关“ dyld:库未加载...”的错误

时间:2018-09-18 18:04:01

标签: git

此错误是什么意思以及如何解决?

$ git status
On branch master
Your branch is up to date with 'origin/master'.

dyld: Library not loaded: /usr/ldyld: Library not loaded: /usr/local/Cellar/gettext/0.19.4/lib/local/Cellar/gettext/0.19.4/lib/libintl.8.dylib
  Referenced fromibintl.8.dylib
  Referenced from: /usr/local/bin/gettext
  Reaso: /usr/local/bin/envsubst
  Reasn: image not found
on: image not found
dyld: Library not loaded: /usr/local/Cellar/gettext/0.19.4/lib/libintl.8.dylib
  Referenced from: /usr/local/bin/envsubst
  Reason: image not found
/usr/local/bin/gettext.sh: line 87:  3166 Abort trap: 6           envsubst "$1"
dyld: Library not loaded: /usr/local/Cellar/gettext/0.19.4/lib/libintl.8.dylib
  Referenced from: /usr/local/bin/gettext
  Reason: image not found
dyld: Library not loaded: /usr/local/Cellar/gettext/0.19.4/lib/libintl.8.dylib
  Referenced from: /usr/local/bin/envsubst
  Reason: image not found
dyld: Library not loaded: /usr/local/Cellar/gettext/0.19.4/lib/libintl.8.dylib
  Referenced from: /usr/local/bin/envsubst
  Reason: image not found
/usr/local/bin/gettext.sh: line 87:  3207 Abort trap: 6           envsubst "$1"
nothing to commit, working tree clean

$ which git
/usr/local/bin/git

$ git --version
git version 2.19.0

2 个答案:

答案 0 :(得分:1)

通过App Store应用升级Xcode和命令行工具并重新启动计算机后,问题消失了。

答案 1 :(得分:0)

我通过升级节点的Homebrew版本来解决此问题

brew update
brew doctor
brew upgrade node
brew link --overwrite node

最后一部分brew link --overwrite node是为了使/usr/local/bin/node与新的Homebrew版本的节点符号链接,而不是先前的版本。