The installation of cmake under Ubuntu and the problems encountered

1. First download the installation you need on the official website, the official website address

2. Upload to the Ubuntu file directory through XShell, and then decompress

Steps:

# 在ubuntu中先创建C_Make文件
mkdir C_Make
#解压
tar -zxvf cmake-3.3.2.tar.gz

When Xshell uploads, the solution to Permission is not allowed appears
insert image description here

#是因为文件夹的权限不够,改变文件夹的权限
chmod 777 C_Make

3. Update g++

sudo apt-get install g++

4. Check if there is cmake

which cmake

If there is an address, it means that it has been installed before, and you can use the following command to uninstall

sudo apt-get remove cmake

5. Enter the decompressed cmake-3.3.2 file

cd cmake-3.3.2

6. Then check

./bootstrap

7. Then you can install openssl

sudo apt-get install libssl-dev

8. Check again

./bootstrap

9. Compile construction

make

10. Install

sudo make install

11. Check version

cmake --version

12. View the installation location

which cmake

Guess you like

Origin blog.csdn.net/qq_41977843/article/details/128243038