2014-01-15 38 views
1

當我給下面的命令安裝OpenCV的但不是在OS-X小牛鏈接錯誤信息

brew install homebrew/science/opencv 

brew install opencv 

我得到以下信息。

Warning: opencv-2.4.7.1 already installed, it's just not linked 

任何想法如何解決這個問題。 根據鏈接,我在.bash_profile中已經有了以下內容。

Installing openCV 2.4.2 on Mac OS X 10.9 (Mavericks)

export PYTHONPATH=/usr/local/Cellar/opencv/2.4.6.1/lib/python2.7/site-packages:$PYTHONPATH 

Linking Python with Open CV on Mac

export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH 

當我使用下面的命令做一個鏈接,我碰到下面的錯誤。

$brew link opencv 
Linking /usr/local/Cellar/opencv/2.4.7.1... Warning: Could not link opencv. Unlinking... 

Error: Could not symlink file: /usr/local/Cellar/opencv/2.4.7.1/lib/pkgconfig/opencv.pc 
/usr/local/lib/pkgconfig is not writable. You should change its permissions. 

任何想法如何解決這個問題?

謝謝。

+0

我跟着這個鏈接來解決該問題。 http://stackoverflow.com/questions/16432071/how-to-fix-homebrew-permissions –

回答

2

我解決了BREW鏈接--overwrite --dry運行的OpenCV

+0

我不明白,我認爲幹運行實際上並沒有改變任何東西。我嘗試了它,並且像它顯示了所做的更改,但錯誤仍然存​​在 –

2

我有同樣的問題的問題。通過上面提到的帖子,我通過brew doctor建議的一系列chown命令解決了這個問題。 以下是我,當我使用brew doctor

Warning: Some directories in /usr/local/share/man aren't writable. 
This can happen if you "sudo make install" software that isn't managed 
by Homebrew. If a brew tries to add locale information to one of these 
directories, then the install will fail during the link step. 
You should probably `chown` them: 

    /usr/local/share/man/de 
    /usr/local/share/man/de/man1 
    /usr/local/share/man/mann 

所以我改變了自己的這些文件夾中。

後,我用brew link --overwrite opencv

現在,當我鍵入鏈接沖泡OpenCV的,它顯示

Warning: Already linked: /usr/local/Cellar/opencv/2.4.11 
To relink: brew unlink opencv && brew link opencv 

,我認爲它的工作原理。

2

我使用 sudo chown -R $USER /usr/local/lib/python2.7/site-packages

解決這個問題,那麼 brew link numpy

0

我跑「釀造醫生」,然後只是跟着沖泡醫生指導