2015-06-25 19 views
2

當我在我的終端上運行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:

automake 
libgpg-error 
libksba 
libtool 

然後,當我嘗試任何包brew link packagename命令鏈接我得到這樣出來放:

Linking /usr/local/Cellar/automake/1.15... Error: Could not symlink share/info/automake-history.info /usr/local/share/info is not writable.

我想安裝git並需要解決這個問題。或者這是一個問題?

編輯: 此外,當我與sudo嘗試像sudo brew link automake這時候這個錯誤:

Error: Cowardly refusing to sudo brew link You can use brew with sudo, but only if the brew executable is owned by root. However, this is both not recommended and completely unsupported so do so at your own risk.

並沒有什麼變化。

+0

嘗試'須藤BREW鏈接程序包名' –

+0

請參閱我對編輯的問題 – Mehmet

+1

嘗試將它放入'.bash_profile'中:export DYLD_LIBRARY_PATH =/usr/local/lib:$ DYLD_LIBRARY_PATH',然後重新啓動終端並運行命令(不含sudo)'brew鏈接packagename'。如果這不起作用,我最後的建議是:'sudo chown -R $ USER/usr/local/share/info && brew doctor' –

回答

1

看來,目錄/usr/local/share/info沒有正確的所有權,所以嘗試:

sudo chown -R $USER /usr/local/share/info && brew doctor 

它可能還需要包括在您的個人資料DYLD_LIBRARY_PATH

export DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH