源码编译opencv 找不到cmake3

源码编译opencv 找不到cmake3

-D WITH_CUBLAS=ON ..
-- The CXX compiler identification is GNU 5.5.0
-- The C compiler identification is GNU 5.5.0
-- Check for working CXX compiler: /usr/local/gcc/bin/g++
-- Check for working CXX compiler: /usr/local/gcc/bin/g++ -- broken
CMake Error at /usr/share/cmake3/Modules/CMakeTestCXXCompiler.cmake:45 (message):
  The C++ compiler

    "/usr/local/gcc/bin/g++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/menglingjun/menglingjun/software/opencv-master/build/CMakeFiles/CMakeTmp

    Run Build Command:"/usr/bin/gmake" "cmTC_39633/fast"
    /usr/bin/gmake -f CMakeFiles/cmTC_39633.dir/build.make CMakeFiles/cmTC_39633.dir/build
    gmake[1]: Entering directory `/data/menglingjun/software/opencv-master/build/CMakeFiles/CMakeTmp'
    /bin/sh: /usr/bin/cmake3: No such file or directory
    gmake[1]: *** [CMakeFiles/cmTC_39633.dir/testCXXCompiler.cxx.o] Error 127
    gmake[1]: Leaving directory `/data/menglingjun/software/opencv-master/build/CMakeFiles/CMakeTmp'
    gmake: *** [cmTC_39633/fast] Error 2
  CMake will not be able to correctly generate this project.

关注这里/bin/sh: /usr/bin/cmake3: No such file or directory
我查看了一下/usr/bin/下有cmake,查一下cmake版本(cmake --version)发现cmake是3版本,我觉得这个cmake就是3,所以创建一个软链(副本)

ln -s cmake cmake3

我这里就ok了,如果你有别的问题,百度其他地方把。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值