gpt4 book ai didi

macos - brew链接错误libpng和libtiff

转载 作者:行者123 更新时间:2023-12-02 11:22:20 25 4
gpt4 key购买 nike

我尝试使用 Homebrew 软件安装 elixir,但出现以下错误

==> Pouring libtiff-4.0.3.yosemite.bottle.tar.gz
Error: An unexpected error occurred during the `brew link` step
The formula built, but is not symlinked into /usr/local

文件存在 -/usr/local/lib
错误:文件存在 -/usr/local/lib

我跑了 brew doctor我看到了这个
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:

libpng
libtiff

所以我跑了 brew link libpng我得到了这个
Linking /usr/local/Cellar/libpng/1.6.17... Error: File exists - /usr/local/lib

我不知道出了什么问题。任何帮助

最佳答案

好像在你的 /usr/local/lib文件夹,现有libpng符号,因此 brew不想覆盖它们。它是 elixir 的依赖项,因此它会停止设置。

如果您使用 MacPorts 或 Homebrew 或手动安装任何东西,则依赖关系可能会发生冲突。最好以互斥方式使用其中一个。

如果您不打算从源代码构建软件包,那么总体上使用 Homebrew 是一个可行的选择,因为它易于使用。

Homebrew 无法按您的预期工作。默认情况下,它有一个基本目录来安装 keg 的工件。名为 Cellar ,虽然它是可配置的。通常,您会将二进制文件复制到 /usr/local/bin , 图书馆到 /usr/local/lib , header 到 /usr/local/include等等......但是,Homebrew 将它们安装到自己的目录中,并在这些目录上创建符号链接(symbolic link),以使它们以相同的方式运行。

您可能会发现 brew doctor 有错误(或不兼容)。命令。它会告诉你符号/文件冲突。您可以手动从文件系统中删除它们,之后 brew将创建指向其基目录的符号链接(symbolic link)(根据您的 brew link $PACKAGE_NAME 命令)。

实验

当我突然决定做一件小事brew doctor在我的电脑中,它确实输出了一些意想不到的头文件,如下所示:

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

但是,它还指出,如果一切正常,这些都没有意义:
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

输出的前几行:
Unexpected header files:
/usr/local/include/node/android-ifaddrs.h
/usr/local/include/node/ares.h
...

这不是我的个人电脑,但好像有人安装了 node手动到这台计算机(实际上是用户)。试图通过 brew 安装它或任何依赖它的东西在这种情况下会失败,因为即将到来的头文件会与预安装的头文件冲突。

关于macos - brew链接错误libpng和libtiff,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31226878/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com