【问题标题】:Troubleshooting optipng install with brew install optipng使用 brew install optipng 对 optipng 安装进行故障排除
【发布时间】:2014-05-28 00:39:36
【问题描述】:

我整个晚上都在我的 mac 终端窗口上尝试解决这个问题。我在我的 Mac 上使用“brew install optipng”安装 optipng 时遇到困难。

这是 'brew install optipng' 后来自终端的日志

==> Downloading https://downloads.sourceforge.net/project/optipng/OptiPNG/optipn
Already downloaded: /Library/Caches/Homebrew/optipng-0.7.5.tar.gz
==> ./configure --with-system-zlib --prefix=/usr/local/Cellar/optipng/0.7.5 --ma
==> make install
  _main in optipng.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [optipng] Error 1
make: *** [install] Error 2

READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting

当然,我按照 github 的链接,尝试使用 brew doctor、brew doctor 建议的说明,甚至是 brew update 去某个地方。

我将在此处包含来自 brew doctor 的一些警告,并在需要时跟进整个日志(我不想用不必要的信息堵塞帖子)。

Warning: gettext files detected at a system prefix
These files can cause compilation and link failures, especially if they
are compiled with improper architectures. Consider removing these files:
    /usr/local/lib/libintl.dylib

Warning: Your XQuartz (2.7.4) is outdated
Please install XQuartz 2.7.5:
  https://xquartz.macosforge.org

Warning: Python is installed at /Library/Frameworks/Python.framework

Warning: You have MacPorts or Fink installed:
  /opt/local/bin/port

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

任何帮助将不胜感激。

谢谢

【问题讨论】:

    标签: macos terminal installation homebrew


    【解决方案1】:

    这对我来说真的很令人沮丧,但我设法解决了自制医生问题,方法如下:

    • 警告:Python 安装在 /Library/Frameworks/Python.framework

    我安装了多个版本的 Python,所以我继续删除了这个:

    sudo rm -rf /Library/Frameworks/Python.framework
    
    • 警告:您已安装 MacPorts 或 Fink:

    这个比较难,我的 Macports 有 PATH 问题,所以我不得不用终端添加它所在的路径,然后从那里删除它。

    • 警告:在 /usr/local/lib 中发现了未编译的 dylib。

    我在终端上用 rm 删除了这些。

    • 警告:在 /usr/local/lib 中发现未编译的 .la 文件。

    已删除。

    • 在 /usr/local/lib 中找到未编译的静态库。

    如果我没记错的话,我在这里做了 brew prune。

    我的所有 PATH 文件中的权限也从 root 更改为我。

    执行此操作后 optipng 安装正常。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-08-15
      • 1970-01-01
      • 2019-08-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多