簡體   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