您好,登錄后才能下訂單哦!
注意系統版本,因為之前裝錯了版本,重裝還導致了下面的問題
問題:Waiting for other installations to finish(參考:http://superuser.com/questions/169908/installer-hangs-on-waiting-for-other-installations-to-finish-despite-no-other)
解決:Chances are that a previous installation hung and the lock was never cleaned up.
1)sudo rm /private/var/db/mds/system/mds.install.lock
2) reboot
記得更新下,有點慢。(https://trac.macports.org/ticket/43228):
Terminal: sudo port selfupdate
之前有安裝過但是失敗了,說是沒驗證不能運行,重新安裝了下還是有這個問題,調整了下mac的安全權限:
(參考:http://www.native-instruments.com/en/support/knowledge-base/show/949/mac-os-10.8-error-message-...-cant-be-opened-because-it-is-from-an-unidentified-developer./)
發現Terminal里還是不是識別cmake指令,修改路徑并export path 也不行(http://blog.csdn.net/ikscher/article/details/8348925),
就裝了brew(http://stackoverflow.com/questions/20381128/how-to-install-homebrew-on-mac-osx):
Terminal:ruby-e"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
然后用brew安裝了CMake(https://github.com/travis-ci/travis-ci/issues/2175)
Terminal:
brew update
brew install cmake
注意下版本,解壓。
Terminal:
sudo port uninstall opencvcd opencv的目錄mkdir buildcd buildcmake -G "Unix Makefiles" ..make -j8sudo make install
編譯靜態庫(http://blogs.wcode.org/2014/10/howto-install-build-and-use-opencv-macosx-10-10/)1)打開CMake,選好opencv源碼路徑和靜態庫存放路徑2)點擊進行配置,去掉BUILD_SHARED_LIBS、BUILD_TESTS、WITH_1394、WITH_FFMPEG,添加x86_64到CMAKE_OSX_ARCHITECTURES,添加sdk到 CMAKE_OSX_SYSROOT,“/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk”3)重新配置并生成4)Terminal:cd 靜態庫目錄make (This will take awhile)sudo make install
Teriminal:sudo /usr/bin/xcode-select –switch /Applications/Xcode.app/Contents/Developer
安裝好Qt在Qt Creator中根據需要添加庫,即可INCLUDEPATH += /usr/local/includeDEPENDPATH += /usr/local/includemacx: PRE_TARGETDEPS += /usr/local/lib/libopencv*.amacx: LIBS += -L /usr/local/lib/libopencv*開一個控制臺測試程序測試之,必要時記得加
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9 到pro里
或者
http://stackoverflow.com/questions/14940126/opencv-2-4-3-cant-find-imread-and-surffeaturedetectordetect
原文參考:http://drthitirat.wordpress.com/2014/09/21/install-opencv-2-4-9-and-qt-5-3-2-on-mac-osx-10-9-5-and-xcode-6-0-1/
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。