偷懒方式安装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
参考
标签:cmake,tar,3.14,gz,cd,偷懒,&& 来源: https://blog.csdn.net/qq_35975447/article/details/118603256