Detailed steps to properly install cmake under Linux

Before Linux can properly build the mbedtls development environment, you need to install the appropriate cmake in Linux. Use apt-get tool to install the usual version is too old. The following are detailed steps

  1. First create a cmake folder, I have already created it, so go directly.
  2. Obtain the installation package through the wget command. This download process is very, very, very slow. Do not turn off the computer before downloading is complete, just wait for the virtual machine to collect the corpse. In addition, the cmake version here is modified according to your needs. I downloaded 3.10.0
wget https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.sh


3. Perform the installation process

yes|sh cmake-3.10.0-Linux-x86_64.sh|cat

  1. Configure environment variables, you can directly enter the following command in the current directory to modify the path
echo "export PATH=$PWD/cmake-3.10.0-Linux-x86_64/bin:\$PATH">>$HOME/.bashrc

Another method is to open the .bashrc file and add the following line to the last line of the file. Remember to change the directory to your own installation directory. This step is very important and it is easy to make mistakes. It is recommended to think about it and then knock it, I will directly invalidate the command,

export PATH=/home/dml/dml/cmake/cmake-3.8.2-Linux-x86_64/bin:$PATH

  1. Environment variables take effect, there is a space in the middle don't miss it, these spaces in Linux are really a headache
source ~/.bashrc


6. This step is considered a successful installation. View version information

Published 9 original articles · won 7 · visited 1767

Guess you like

Origin blog.csdn.net/weixin_44906810/article/details/105473654