找到了 Libfreetype.6.dylib,但架构错误

问题描述

我一直在尝试在我的 Mac 上运行 blat,这是一款生物信息学软件,但您需要知道的是,它是我在终端中运行的可执行文件。当我尝试运行它时,我不断收到此错误

dyld: Library not loaded: /opt/homebrew/lib/libfreetype.6.dylib
  Referenced from: /Users/MyName/./blat
  Reason: no suitable image found.  Did find:
    /opt/homebrew/lib/libfreetype.6.dylib: mach-o,but wrong architecture
    /opt/homebrew/lib/libfreetype.6.dylib: stat() Failed with errno=1
    /opt/homebrew/Cellar/freetype/2.10.4/lib/libfreetype.6.dylib: mach-o,but wrong architecture

有没有人有任何想法如何解决这个问题?很长一段时间,我都收到了找不到 libfreetype.6.dylib 的错误,但我终于能够使用 install_name_tool 来将它定向到正确的位置,现在我收到了这个错误

解决方法

我不知道答案,但这可能会有所帮助:有什么作用

$ file /Users/MyName/./blat

说?比较

$ file /opt/homebrew/lib/libfreetype.6.dylib

如果它们不匹配,则既可以解释您的问题,也可以告诉您要查找的内容:与您的 freetype 库匹配的 blat 版本,或 版本与您安装的 blat 匹配的 freetype