Capitan上将公式降级到先前版本

Capitan上将公式降级到先前版本

本文介绍了在Mac El Capitan上将公式降级到先前版本(opencv3/3.0.0)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Mac上,并使用 brew 安装opencv3.我正在使用opencv3/3.0.0.今天,我对其进行了更新,并获得了版本3.1.0_1.

I am on mac and used brew to install opencv3. I was having opencv3/3.0.0 . Today, I updated it and got version 3.1.0_1.

但是,此更新中断了所有操作,当我尝试使用VideoCapture读取帧并使用waitKey函数时,它会由于以下原因而中断:

However, this update is breaking everything and when I try to use VideoCapture to read frames and use waitKey function it breaks by causing following:

因此,现在我尝试切换回以下版本,但不确定如何.我使用了以下内容:

So, now I am trying to switch back to the following version, but I am not sure how. I used following:

但是,这不会给我像opencv3/3.0.0这样的版本

However, this wont give me versions like opencv3/3.0.0

在地窖里,我只有

所以,我不能使用

有人可以建议我切换回以前的版本吗?

Could anyone please suggest me a way of switching back to the previous version?

推荐答案

以下是3.0.0的配方

Here is the recipe for 3.0.0

https://github.com/Homebrew/homebrew-science/blob/f4369af77876e0597e1f23bf2dd0f1ee17efd680/opencv3.rb

自制啤酒似乎将其本地食谱存储在这里:

Homebrew appears to store it's local recipes here:

/usr/local/Library/Taps/homebrew/homebrew-science/opencv3.rb

因此您可以尝试:
-brew uninstall opencv3
-用该版本替换本地文件.
-brew install opencv3
(未经测试,我肯定会先备份)

So you might try:
- brew uninstall opencv3
- replace the local file with that version.
- brew install opencv3
(this is untested, i would definitely make a backup first)

更好的解决方案是从源代码编译最新的openCV-已添加补丁程序以解决此问题. 与此错误相关的线程对该过程有一些很好的指导.从源代码编译openCV非常方便,既可以在您需要特定功能时使用,也可以因为这样的烦人错误频繁出现.软件包管理器(以及opencv.org自己的二进制文件)很少与补丁有关.

A better solution is to compile the latest openCV from source - a patch has been added to fix the issue. The thread relating to this bug has some good pointers as to the procedure. Compiling openCV from source is pretty handy, both if you require particular features, and because irritating bugs like this crop up fairly frequently. Package managers (and opencv.org's own binaries) are rarely up to date with the patches.

更新
向后移动更好的方法.

update
better methods to move backwards or forwards..

回到3.0
@bfontaine的笔记...

moving back to 3.0
the note from @bfontaine...

brew install https://github.com/Homebrew/homebrew-science/blob/f4369af77876e0597e1f23bf2dd0f1‌​ee17efd680/opencv3.rb

移至3.1.fixed
mateuszmikusz和LukasKalinski在该线程

moving on to 3.1.fixed
latest advice from mateuszmikusz and LukasKalinski on that thread

brew remove opencv3

(有效地清理了所有内容,Xcode立即注意到了它)

(effectively cleaned everything and Xcode immediately noticed it)

brew cleanup
brew install --HEAD opencv3

这篇关于在Mac El Capitan上将公式降级到先前版本(opencv3/3.0.0)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 11:12