gpt4 book ai didi

opencv - 使用 HomeBrew 安装旧版本的 OpenCv 2.4.4

转载 作者:太空宇宙 更新时间:2023-11-03 21:55:47 27 4
gpt4 key购买 nike

我的项目需要使用 OpenCV 2.4.4 版本,但由于某些原因我无法使用 Homebrew 软件安装它。

当我运行 Homebrew 版本的 opencv 时,我得到:

/usr/local$ brew versions opencv
2.4.5 git checkout ae74fe9 /usr/local/Library/Taps/homebrew-science/opencv.rb
2.4.4a git checkout 3efa797 /usr/local/Library/Taps/homebrew-science/opencv.rb
2.4.4 git checkout d85d011 /usr/local/Library/Taps/homebrew-science/opencv.rb
2.4.3 git checkout 8cb3f45 /usr/local/Library/Taps/homebrew-science/opencv.rb
2.4.2 git checkout b64b319 /usr/local/Library/Taps/homebrew-science/opencv.rb
2.4.1 git checkout 3d32cf1 /usr/local/Library/Taps/homebrew-science/opencv.rb
2.4.0 git checkout 2a8c46b /usr/local/Library/Taps/homebrew-science/opencv.rb
2.3.1a git checkout cdaf83d /usr/local/Library/Taps/homebrew-science/opencv.rb
2.2 git checkout 032047f /usr/local/Library/Taps/homebrew-science/opencv.rb
2.1.1-pre git checkout 2438f42 /usr/local/Library/Taps/homebrew-science/opencv.rb
HEAD git checkout c658897 /usr/local/Library/Taps/homebrew-science/opencv.rb
2.1.0 git checkout ecb6a3e /usr/local/Library/Taps/homebrew-science/opencv.rb
/usr/local$ git checkout d85d011 /usr/local/Library/Taps/homebrew-science/opencv.rb

但是当我运行时:

git checkout d85d011 /usr/local/Library/Taps/homebrew-science/opencv.rb

我得到:

error: pathspec 'd85d011' did not match any file(s) known to git.
error: pathspec 'Library/Taps/homebrew-science/opencv.rb' did not match any file(s) known to git.

最佳答案

我也遇到了这个问题。要切换到特定分支(2.4.4 或 2.4.3),您必须导航到正确的 git 文件夹。在这种情况下,您想转到 homebrew-science 子文件夹。

  1. cd/usr/local/Library/Taps/homebrew-science

  2. git checkout d85d011 opencv.rb 到 checkout 分支 2.4.4

  3. brew install opencv(如果您已经安装了一些其他版本,您可能需要运行brew unlink opencv)

关于opencv - 使用 HomeBrew 安装旧版本的 OpenCv 2.4.4,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18649627/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com