【问题标题】:Incompatible gettext and git installed by Homebrew?Homebrew 安装的 gettext 和 git 不兼容?
【发布时间】:2018-10-15 07:02:55
【问题描述】:
$ 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“公式”的方法,但在网上找到的所有解决方案都已证明是过时的,而不是工作。

【问题讨论】:

    标签: git installation homebrew gettext sysadmin


    【解决方案1】:

    Homebrew 的 gettext 默认不链接到 /usr/local/bin。旧版本可能已在某个时候链接,并且该二进制文件指向过时的安装。为什么 git 与之相关是另一个问题(假设您使用的是 Homebrew 的 git)。

    首先尝试brew unlink gettextbrew reinstall git --force-bottle。如果这不起作用,您可以使用 brew link --overwrite gettext 覆盖旧的链接版本。

    【讨论】:

    • 必须是brew link --overwrite --force gettext
    猜你喜欢
    • 1970-01-01
    • 2011-11-15
    • 2015-03-01
    • 1970-01-01
    • 1970-01-01
    • 2020-08-20
    • 1970-01-01
    • 2021-04-12
    • 1970-01-01
    相关资源
    最近更新 更多