升級Cmake(不用卸載原有的版本)
1、下載需要的版本
1 | https://cmake.org/download/ |
2、解壓、編譯并安裝到制定目錄,修改環(huán)境變量
1 2 3 4 5 6 7 8 9 10 11 12 13 | tar -zxvf cmake-3.20.0-rc1.tar.gz cd cmake-3.20.0-rc1 ./bootstrap --prefix=/opt/cmake-install make make install sudo gedit ~/.bashrc #把下面兩個命令加入~/.bashrc中 export PATH=/opt/cmake-install/bin:$PATH export CMAKE_PREFIX_PATH=/opt/cmake-install:$CMAKE_PREFIX_PATH #保存一下并運(yùn)行 source ~/.bashrc |
我目前使用的是:
vim ~/.bashrc
export PATH=/opt/cmake-3.17.0-Linux-x86_64/bin:$PATH export CMAKE_PREFIX_PATH=/opt/cmake-3.17.0-Linux-x86_64:$CMAKE_PREFIX_PATH
*博客內(nèi)容為網(wǎng)友個人發(fā)布,僅代表博主個人觀點(diǎn),如有侵權(quán)請聯(lián)系工作人員刪除。