2012-11-20 53 views
20
Warning: Could not link pkg-config. Unlinking... 
Error: The `brew link` step did not complete successfully 
The formula built, but is not symlinked into /usr/local 
You can try again using `brew link pkg-config`‏‏‏‏‏‏ 

回答

22
  1. 釀造重裝pkg配置
  2. RM -R違規目錄
  3. 重複步驟1
+1

是否有類似的解決方案,但對於Ubuntu? – Pinocchio

+0

第三步無用或者應該'brew unlink pkg-config && brew link pkg-config' – soyuka

+0

您可以用'brew reinstall pkg-config'合併前三個步驟。 – bfontaine

2

它可能是/ usr/local/share上的權限問題。您需要在該目錄中擁有寫入權限才能完成鏈接。但是,如果您設置寫入權限,zsh會抱怨目錄不安全。我給了寫權限,允許pkg-config安裝,然後將其刪除,以便zsh會很高興。

9

正如邁克爾皮格上面所說,在我的情況下,這是文件夾權限問題。 我必須做到以下幾點:

sudo chmod 777 /usr/local/bin 
sudo chmod 777 /usr/local/share/man/man1 
brew link pkg-config 

而且我做了後:

sudo chmod 755 /usr/local/bin 
sudo chmod 755 /usr/local/share/man/man1 

恢復原來的權限。

相關問題