已安装OpenCV,但在OS-X Mavericks上未链接错误消息

问题描述:

当我给出以下命令时

brew install homebrew/science/opencv

brew install opencv 

我收到以下消息.

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

任何想法如何解决此问题. 根据链接,我已经在.bash_profile中包含以下内容.

Any idea how to fix this. I already have the following in the .bash_profile based on the links.

安装openCV 2.4.2在Mac OS X 10.9(小牛)上

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

在Mac上将Python与Open CV链接

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

当我使用以下命令进行链接时,出现以下错误.

When I do a link using the following command, I get the following error.

$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.

任何想法如何解决此问题?

Any ideas how to fix this ?

谢谢.

我用brew连接--overwrite --dry-run opencv解决了这个问题

I solved the problem with brew link --overwrite --dry-run opencv