$ git status
On branch master
...
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: 10800 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: 10841 Abort trap: 6 envsubst "$1"
nothing to commit, working tree clean
$ ls /usr/local/Cellar/gettext
0.19.8.1
我的 Homebrew 安装的 Git 似乎想要访问不存在的/usr/local/Cellar/gettext/0.19.4?
我已经尝试过
git reinstall git
徒劳。
假设我只需要安装0.19.4版本的gettext,我试图找到安装特定版本的Homebrew“公式”的方法,但在网络上找到的所有解决方案都已被证明是过时的,而不是工作。
最佳答案
Homebrew 的 gettext 默认情况下不链接到/usr/local/bin 。旧版本可能已在某个时刻链接,并且该二进制文件指向过时的安装。为什么 git 链接到这是另一个问题(假设您使用的是 Homebrew 的 git)。
首先尝试 brew unlink gettext
和 brew reinstall git --force-bottle
。如果这不起作用,您可以使用 brew link --overwrite gettext
覆盖旧的链接版本。
关于git - Homebrew 安装的 gettext 和 git 不兼容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52811328/