UBUNTU环境下Cmake版本 更改 升级

UBUNTU环境下Cmake版本 更改 升级

通过apt安装的版本较低

sudo apt-get install cmake

官方给出的: https://cmake.org/download/

The release was packaged with CPack which is included as part of the release. The .sh files are self extracting gziped tar files. To install a .sh file, run it with /bin/sh and follow the directions. The OS-machine.tar.gz files are gziped tar files of the install tree. The OS-machine.tar.Z files are compressed tar files of the install tree. The tar file distributions can be untared in any directory. They are prefixed by the version of CMake. For example, the Linux-x86_64 tar file is all under the directory cmake–Linux-x86_64. This prefix can be removed as long as the share, bin, man and doc directories are moved relative to each other. To build the source distributions, unpack them with zip or tar and follow the instructions in Readme.txt at the top of the source tree.

翻译过来:

该发行版与CPack打包在一起,而CPack包含在发行版中。.sh文件是自解压缩gzip压缩的tar文件。要安装.sh文件,请使用/ bin / sh运行该文件并按照说明进行操作。OS-machine.tar.gz文件是安装树的gzip压缩tar文件。OS-machine.tar.Z文件是安装树的压缩tar文件。tar文件发行版可以在任何目录中解压。它们以CMake版本作为前缀。例如,Linux-x86_64 tar文件都在cmake–Linux-x86_64目录下。**只要share,bin,man和doc目录相对于彼此移动,就可以删除此前缀。**要构建源发行版,请使用zip或tar解压缩它们,并按照源树顶部的Readme.txt中的说明进行操作。

因此只需要将其软链接到/usr/bin/中覆盖系统原始的cmake即可实现版本替换。

wget -P /opt/ https://cmake.org/files/v3.14/cmake-3.14.0-Linux-x86_64.tar.gz
tar zxvf /opt/cmake-3.14.0-Linux-x86_64.tar.gz -C /opt
cd /opt/cmake-3.14.0-Linux-x86_64
ln -sf /opt/cmake-3.14.0-Linux-x86_64/bin/* /usr/bin/

cmake --version

echo "done"

详细请参照参考资料

参考资料:
https://blog.csdn.net/whutshiliu/article/details/106480024
http://www.cmake.org/files

安装Caffe在Ubuntu上主要有两种方式,一种是通过源码编译安装,另一种是通过apt命令安装。根据引用和引用的信息,如果你的Ubuntu版本是16.04并且没有GPU,你可以按照以下步骤安装Caffe: 1.首先,确保你的电脑没有GPU。你可以通过引用中提到的方法检查。 2.打开终端,执行以下命令安装Caffe的依赖项: sudo apt update sudo apt install build-essential cmake git libatlas-base-dev libboost-all-dev libgflags-dev libgoogle-glog-dev libhdf5-serial-dev liblmdb-dev libprotobuf-dev libsnappy-dev protobuf-compiler 3.使用git克隆Caffe的源码: git clone https://github.com/BVLC/caffe.git cd caffe git checkout 1.0 4.配置Caffe并编译: cp Makefile.config.example Makefile.config 修改Makefile.config中的配置,根据需要启用或禁用相关选项。 make all make test make runtest 现在,你已经成功安装了Caffe。你可以根据你的需求进一步使用它。 如果你的Ubuntu版本是17.04以上,你可以按照引用中提到的方式通过apt命令安装Caffe: sudo apt install caffe-cpu 另外,根据引用,你还可以考虑升级你的Ubuntu版本到18.04 LTS,以获得更好的系统性能和稳定性。 总结起来,根据你的Ubuntu版本和是否有GPU,你可以选择源码编译安装或通过apt命令安装Caffe。希望这些信息对你有帮助。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* *3* [Ubuntu18.04安装caffe(cpu)—-简单易操作:只需三步!](https://blog.csdn.net/yllifesong/article/details/80980367)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 100%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值