创建软链接 sudo ln -s /opt/cmake-3。* your_version * / bin / * /usr/local/bin
时间: 2023-08-08 07:09:46 浏览: 227
是的,您可以通过创建软链接将 CMake 的可执行文件路径添加到 PATH 环境变量中,以便在终端中全局使用 CMake。以下是创建软链接的步骤:
1. 打开终端并输入以下命令:
```
sudo ln -s /opt/cmake-3.*your_version*/bin/* /usr/local/bin
```
其中,/opt/cmake-3.*your_version*/bin/* 是 CMake 可执行文件所在的路径,your_version 是您下载的 CMake 版本号。/usr/local/bin 是您要添加软链接的路径。
2. 输入您的密码以确认。
3. 验证软链接是否已成功创建。在终端中输入以下命令:
```
cmake --version
```
如果成功创建软链接,您应该能够看到 CMake 的版本号信息。
相关问题
master@ubuntu:~/cmake-3.16.0$ cmake -bash: /usr/bin/cmake: No such file or directory
This error message suggests that CMake is not installed on your system, or it is not installed in the expected location.
You can check if CMake is installed on your system using the command:
```
cmake --version
```
If CMake is not installed, you can install it using your system's package manager. For example, on Ubuntu, you can use the following command:
```
sudo apt-get install cmake
```
If CMake is already installed but not in the expected location, you can try adding the directory containing CMake to your PATH environment variable. For example, if CMake is installed in /opt/cmake/bin, you can add the following line to your ~/.bashrc file:
```
export PATH=/opt/cmake/bin:$PATH
```
After modifying your PATH, you will need to source the ~/.bashrc file or open a new terminal window for the changes to take effect.
CMake Error at /opt/ros/kinetic/share/pcl_conversions/cmake/pcl_conversionsConfig.cmake:113 (message)
引用:CMake Error at/opt/ros/melodic/share/catkin/cmake/safe_execute_process.cmake:11等 。 引用[2]:Cmake Error at builders/vpx.cmake:89 Cmake Error at builders/vpx.cmake:88 Cmake Error at builders/vpx.cmake:87 Cmake Error at builders/vpx.cmake:77 file not found WORK/desktop/cmake/windowsenv_libpath...。 引用:文章目录 问题如下:产生问题分析: 解决办法:效果: 问题如下: 产生问题分析: 由于之前eigen库与ceres库的冲突,进行了两个库的重装并删除了相关文件夹,导致与系统原文件信息不匹配,详细参考:/opt/ros/noetic/share/pcl_ros/cmake/pcl_rosConfig.cmake文件,下图下图的96行,阴影行。 观察发现有路经:/usr/include/eigen3,而我系统此时该路径下不存在eigen3文件夹。 解决办法: 将路径:/usr/local/include/文件夹下的eigen3,复制到路径/usr/include下 输入指令: sudo cp -r /usr/local/include/eigen3 /usr/include 即,该路径下存在eigen3文件了: 效果: 问题解决。 参考博客: ROSERROR : CMake Error at /opt/ros/melodic/share/cv_bridge/cmake/cv_bridgeConfig.cmake:113 (message)。
CMake Error at /opt/ros/kinetic/share/pcl_conversions/cmake/pcl_conversionsConfig.cmake:113 (message) 是CMake在编译过程中遇到的错误。该错误可能是由于库文件或路径的问题导致的。具体地,CMake在寻找pcl_conversionsConfig.cmake文件时发生了错误,可能是由于该文件不存在或路径错误导致的。
解决此问题的方法是检查pcl_conversionsConfig.cmake文件的位置和路径是否正确,确保该文件存在于正确的位置。如果文件确实不存在,您可以尝试重新安装pcl_conversions库或从其他来源获取正确的文件。
另外,您还可以尝试更新您的CMake版本,以确保它与当前使用的ROS版本兼容。还可以检查您的系统环境变量和依赖项是否正确设置。
阅读全文