注意系統(tǒng)版本,因為之前裝錯了版本,重裝還導(dǎo)致了下面的問題
創(chuàng)新互聯(lián)主營芮城網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營網(wǎng)站建設(shè)方案,重慶APP軟件開發(fā),芮城h5成都小程序開發(fā)搭建,芮城網(wǎng)站營銷推廣歡迎芮城等地區(qū)企業(yè)咨詢 問題: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
之前有安裝過但是失敗了,說是沒驗證不能運行,重新安裝了下還是有這個問題,調(diào)整了下mac的安全權(quán)限:
(參考: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./)
發(fā)現(xiàn)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
編譯靜態(tài)庫(http://blogs.wcode.org/2014/10/howto-install-build-and-use-opencv-macosx-10-10/)1)打開CMake,選好opencv源碼路徑和靜態(tài)庫存放路徑2)點擊進(jìn)行配置,去掉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 靜態(tài)庫目錄make (This will take awhile)sudo make install
Teriminal:sudo /usr/bin/xcode-select –switch /Applications/Xcode.app/Contents/Developer
安裝好Qt在Qt Creator中根據(jù)需要添加庫,即可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/
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。