【linux】偷懒方式安装cmake-3.14.5

1.环境

ubuntu18.04
cmake-3.14.5

2.bash脚本自动安装

#!/bin/bash  

wget https://cmake.org/files/v3.14/cmake-3.14.5.tar.gz
tar -xzvf cmake-3.14.5.tar.gz
cd cmake-3.14.5/
./bootstrap
make
echo "your_passwd" | sudo -S make install
cd ..

3.docker中自动安装

ENV passwd=your_passwd
RUN wget https://cmake.org/files/v3.14/cmake-3.14.5.tar.gz  && \
	tar -xzvf cmake-3.14.5.tar.gz && \
	cd cmake-3.14.5/ && \
	./bootstrap && \
	make && \
	echo passwd | sudo -S make install && \
	cd .. && \
	rm -rf cmake-3.14.5.tar.gz

参考

1.Ubuntu16.04安装cmake3.14.5

猜你喜欢

转载自blog.csdn.net/qq_35975447/article/details/118603256