我跑的Kubuntu 11.10(W/KDE 4.8)刪除所有已安裝的OpenCV庫
你讀到這一切之前:
我只是想從我的系統中刪除的OpenCV的所有痕跡,這樣我就可以重新啓動..
整個故事
我第一次安裝的python-的OpenCV和https://launchpad.net/~gijzelaar/+archive/opencv2很久以前libopencv(2.1我認爲)。我當時只嘗試過python-opencv,它工作得很完美(我沒有嘗試使用OpenCV使用C++代碼)
然後我最近嘗試從源代碼安裝OpenCV 2.3.1,它已經安裝,但在編譯時C++代碼(使用OpenCV),它給了我關於libgtk未安裝的錯誤,並且還破壞了我之前運行良好的python opencv代碼
因此,我安裝了libgtk2-dev庫並重新編譯並安裝了OpenCV 2.3.1 ..
錯誤仍然存在,所以我刪除了我正在運行cmake,make等的untarred OpenCV目錄。我沒有在這裏做出卸載(我現在知道是我的錯)
,而是安裝了Ubuntu的OpenCV的2.3包(具有所有依賴性):https://launchpad.net/~gijzelaar/+archive/opencv2.3
現在的問題是我仍然得到時同樣的錯誤我編譯我的C++代碼,其中包括OpenCV的,並且錯誤仍然指向我的(刪除)OpenCV的源文件夾:
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/anant/opencv/OpenCV-2.3.1/modules/highgui/src/window.cpp, line 275
terminate called after throwing an instance of 'cv::Exception'
what(): /home/anant/opencv/OpenCV-2.3.1/modules/highgui/src/window.cpp:275: 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
正如你所看到的錯誤仍然指向的目錄從我所編譯安裝的OpenCV
有沒有辦法徹底刪除我的編譯版本的OpenCV的所有痕跡,只保留ubuntu包中的文件?正如我前面提到我沒有「使卸載」和也(愚蠢)刪除安裝艙單
編輯: 我再次運行包管理器,發現不是從PPA所有OpenCV的包已經得到正確安裝。所以,我做了一個sudo易於得到重新安裝OpenCV,現在我得到這個錯誤:
Unpacking libopencv2.3 (from .../libopencv2.3_2.3.1-3_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/libopencv2.3_2.3.1-3_amd64.deb (--unpack):
trying to overwrite '/usr/lib/libopencv_video.so.2.3.1', which is also in package libopencv-video2.3 2.3.1-4ppa1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Unpacking opencv (from .../opencv_2.3.1-3_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/opencv_2.3.1-3_amd64.deb (--unpack):
trying to overwrite '/usr/bin/opencv_haartraining', which is also in package libopencv-core-dev 2.3.1-4ppa1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libopencv2.3_2.3.1-3_amd64.deb
/var/cache/apt/archives/opencv_2.3.1-3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我只是想從我的系統中刪除的OpenCV的所有痕跡,這樣我就可以重新開始
謝謝!正是我在找的東西。我卸載了軟件包,然後運行sudo find/-name「* opencv *」-exec rm -i {} \;然後重新安裝軟件包。通過運行sudo dpkg -i --force-overwrite path-to-package修復了我最後的錯誤。 OpenCV現在似乎工作,但我還沒有徹底測試它。 Python-OpenCV像以前一樣工作。 – flak37 2012-02-14 15:39:11
很高興能幫到你! – mevatron 2012-02-14 16:16:08
另一個相關的建議是在下次需要使用OpenCV時在虛擬機中安裝OpenCV;這樣當卸載所有你需要做的就是銷燬VM和* poof *,你就完成了。 – the911s 2014-07-07 21:30:19