2016-11-16 116 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解决了我的问题,因为它重新修改了环境变量。