2016-11-16 155 views
1

我在Linux機器上獨立安裝了OpenCV,並且運行正常。我安裝了ROS(帶有其OpenCV的),今天我不能在任何我的OpenCV項目的運行我的CMakeLists.txt,得到的錯誤:OpenCV環境變量已更改

CMake Error at CMakeLists.txt:20 (find_package): 
    By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has 
    asked CMake to find a package configuration file provided by "OpenCV", but 
    CMake did not find one. 

    Could not find a package configuration file provided by "OpenCV" with any 
    of the following names: 

    OpenCVConfig.cmake 
    opencv-config.cmake 

    Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set 
    "OpenCV_DIR" to a directory containing one of the above files. If "OpenCV" 
    provides a separate development package or SDK, be sure it has been 
    installed. 

我有點相信這事,因爲一些環境變量,但是得到了改變我不知道在哪裏看。

有人可以通過這個走過我嗎?

+0

那麼,如果您按照最後一段中的說明進行操作,會發生什麼? –

+0

那麼,我重新安裝OpenCV,它的工作,可能改變了環境變量。 –

回答

0

重新安裝OpenCV解決了我的問題,因爲它重新修改了環境變量。