這裏真的很煩人的問題。在Linux Mint操作系統上。幾乎每隔一段時間,我會運行OpenCV的代碼時出現此錯誤:OpenCV不斷「卸載」自己(Linux)
HIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP
OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvNamedWindow, file /home/ravi/Desktop/opencv/OpenCV-2.1.0/src/highgui/window.cpp, line 180
terminate called after throwing an instance of 'cv::Exception'
what(): /home/ravi/Desktop/opencv/OpenCV-2.1.0/src/highgui/window.cpp:180: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvNamedWindow
解決這個問題的辦法,我發現,它做到以下幾點:
cd OpenCV/
cd build/
cmake ..
make
sudo make install
sudo ldconfig
<restart computer>
然後我會回來,再次開始運行我的OpenCV代碼,它會沒事的。但是幾個小時之後,或者可能在開啓/關閉cpu之間,我會回到同樣的愚蠢錯誤!
有沒有人有任何想法這裏發生了什麼,我怎麼可以防止這種情況?這真是令人沮喪。
現在地球上會發生什麼? o.O – 2013-07-07 05:51:06
剛剛再次發生。運行我的OpenCV項目,工作。更改了一些.cpp代碼,在項目目錄中的'make',現在不能再工作了=( – JDS
你的makefile對庫有什麼奇怪的做法嗎?例如'make clean'規則可能會執行'rm/usr/local/lib/ .so'? –
maditya