CMake Error: Could not find CMAKE_ROOT !!!

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CMake Error: Could not find CMAKE_ROOT !!!相关的知识,希望对你有一定的参考价值。

参考技术A 引用 https://www.cnblogs.com/blackay03/p/9062503.html

源码安装的cmake,升级之后报错啦
因为不在usr/local/share 目录中了,手动删除目录之后还是不行,百度一番之后

找到cmake 目录下的install_manifest.txt 文件,集中删除里面的内容即可。
cat install_manifest.txt | sudo xargs rm

CMake error:System Error:No such file or directory CMake error:Could not open file for write in cop

微型电脑或嵌入式与电脑还是有点不同的,在微型电脑上ros indigo 版本下利用catkin编译如果你遇到如下错误:

CMake error:System Error:No such file or directory  

CMake error:Could not open file for write in copy operation xxxx.ros_Config.cmake.tmp. 

CMake error:at /opt/ros/indigo/share/catkin/cmake/catkin_package.cmake:380

 

解决方法:

1. 切到root用户:用su、su - root或su -   (用户名root可以省略不写。)

2. 这样如果出现Authentication failed 等类似错误,则用  

  sudo bash

 

3. 然后用catkin_make编译,等编译好了,

 

4. 则返回普通用户即可

方法:su - (你的用户名)

 

以上是关于CMake Error: Could not find CMAKE_ROOT !!!的主要内容,如果未能解决你的问题,请参考以下文章

CMake Error: Could not create named generator Visual Studio 16 2019解决方法

CMake Error: Could not create named generator Visual Studio 16 2019解决方法

CMake error:System Error:No such file or directory CMake error:Could not open file for write in cop

-- Could not find the required component 'pcl_ros'. The following CMake error indicates that

Got fatal error 1236 from master when reading data from binary log: 'Could not find first log fi

Could not find the required component ‘tf2_geometry_msgs‘. The following CMake error indicates that(