我在 Ubuntu 16.04 上。第一次使用Linux系统。我安装了cmake,我可以通过键入在终端中检查它
/opt/cmake/bin/cmake -version
cmake version 2.8.3
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试安装另一个需要 cmake 的程序时
git clone --recursive https://github.com/Microsoft/LightGBM
cd LightGBM
mkdir build ; cd build
cmake ..
The program 'cmake' is currently not installed. You can install it by typing:sudo apt install cmake
Run Code Online (Sandbox Code Playgroud)
如何修复这个程序?我想我应该设置一些,path但我不确定...
此外,当我在所在的文件夹中cmake并输入cmake -version这样的内容时
~/cmake-2.8.3/bin$ cmake -version
Run Code Online (Sandbox Code Playgroud)
然后它报告
The program 'cmake' is currently not installed. You can install it by typing:sudo apt install cmake
Run Code Online (Sandbox Code Playgroud)
首先,你是如何“安装cmake”的?使用Ubuntu的软件包管理器的一个安装cmake=3.5.1-1ubuntu3叶cmake二进制文件/usr/bin/,没有/opt/cmake/bin。
要解决您的问题,请sudo apt install cmake添加或添加/opt/cmake/bin到您的PATH. 在您的~/.bashrc, 添加
PATH=$PATH:/opt/cmake/bin
Run Code Online (Sandbox Code Playgroud)
然后. ~/.bashrc在重试构建之前。
| 归档时间: |
|
| 查看次数: |
18320 次 |
| 最近记录: |