繁体   English   中英

brew链接错误libpng和libtiff

[英]brew link error libpng and libtiff

我尝试使用自制软件安装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不像你期望的那样工作。 默认情况下,它有一个基本目录来安装名为Cellarkeg的工件,尽管它是可配置的。 通常,您将二进制文件复制到/usr/local/bin ,将库复制到/usr/local/lib ,将头文件复制到/usr/local/include等等...但是,Homebrew会将它们安装到自己的目录中,相反,在这些目录上创建符号链接,以使它们以相同的方式起作用。

您可能会发现brew doctor命令出现错误(或不兼容)。 它会告诉你符号/文件冲突。 您可以手动从文件系统中删除它们,然后brew将创建指向其基本目录的符号链接(在您的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安装它或依赖于它的任何东西都会失败,因为即将到来的头文件会与预先安装的头文件冲突。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM