red linux6.8命令,redhat 6.8升级默认cmake 2.8到cmake 3.9

前言

编译mysql 8.0.18源码需要cmake,而redhat 6.8默认cmake版本为cmake 2.8,不能正常编译mysql 8.0.18源码。后查阅资料发现对于cmake版本有要求。本文主要展现如何安装cmake 3.9具体操作步骤,希望对于初学者有帮助。

联系方式

微信公众号

微信

培训课件

(收费20元已共享到百度云盘便于同学们获取)

abd57a72d8ec63dea7c11c19b7fddfd5.png

ca338a24151846e34d45d20712e5dbf1.png

目录

cmake 3.9安装介质

上传 cmake 3.9安装介质

解压

cmake 3.9安装介质

获取cmake 3.9安装指令

执行cmake 3.9 bootstrap

执行make

执行make install

验证cmake 3.9

cmake 3.9安装介质

上传 cmake 3.9安装介质

[root@mysql8018 ~]# mkdir -p cmake_new_dir

[root@mysql8018 cmake_new_dir]# ll

总用量 7524

-rw-r--r--. 1 root root 7703777 12月  2 13:57 cmake-3.9.2.tar.gz

解压cmake 3.9安装介质

[root@mysql8018 cmake_new_dir]# tar -zxvf cmake-3.9.2.tar.gz

获取cmake 3.9安装指令

[root@mysql8018 cmake-3.9.2]# more README.rst

UNIX/Mac OSX/MinGW/MSYS/Cygwin

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

You need to have a compiler and a make installed.

Run the ``bootstrap`` script you find in the source directory of CMake.

You can use the ``--help`` option to see the supported options.

You may use the ``--prefix=`` option to specify a custom

installation directory for CMake. You can run the ``bootstrap`` script from

within the CMake source directory or any other build directory of your

choice. Once this has finished successfully, run ``make`` and

``make install``.  In summary::

$ ./bootstrap && make && make install

执行cmake 3.9 bootstrap

[root@mysql8018 cmake_new_dir]# ll

总用量 7528

drwxr-xr-x. 11 root root    4096 12月  2 13:58 cmake-3.9.2

-rw-r--r--.  1 root root 7703777 12月  2 13:57 cmake-3.9.2.tar.gz

[root@mysql8018 cmake_new_dir]# cd cmake-3.9.2

[root@mysql8018 cmake-3.9.2]# ll

总用量 284

drwxr-xr-x.   4 502 games  4096 9月   8 2017 Auxiliary

-rwxr-xr-x.   1 502 games 48336 9月   8 2017 bootstrap

-rw-r--r--.   1 502 games  9706 9月   8 2017 CMakeCPack.cmake

-rw-r--r--.   1 502 games 12897 9月   8 2017 CMakeCPackOptions.cmake.in

-rw-r--r--.   1 502 games   153 9月   8 2017 CMakeGraphVizOptions.cmake

-rw-r--r--.   1 502 games 31721 9月   8 2017 CMakeLists.txt

-rw-r--r--.   1 502 games  4481 9月   8 2017 CMakeLogo.gif

-rw-r--r--.   1 502 games   790 9月   8 2017 cmake_uninstall.cmake.in

-rw-r--r--.   1 502 games  3322 9月   8 2017 CompileFlags.cmake

-rwxr-xr-x.   1 502 games    99 9月   8 2017 configure

-rw-r--r--.   1 502 games  1851 9月   8 2017 CONTRIBUTING.rst

-rw-r--r--.   1 502 games  5018 9月   8 2017 Copyright.txt

-rw-r--r--.   1 502 games   440 9月   8 2017 CTestConfig.cmake

-rw-r--r--.   1 502 games  6213 9月   8 2017 CTestCustom.cmake.in

-rw-r--r--.   1 502 games   374 9月   8 2017 DartConfig.cmake

-rw-r--r--.   1 502 games 28046 9月   8 2017 doxygen.config

drwxr-xr-x.  18 502 games  4096 9月   8 2017 Help

drwxr-xr-x.   2 502 games  4096 9月   8 2017 Licenses

drwxr-xr-x.  12 502 games 20480 9月   8 2017 Modules

drwxr-xr-x.   3 502 games  4096 9月   8 2017 Packaging

-rw-r--r--.   1 502 games  3016 9月   8 2017 README.rst

drwxr-xr-x.  11 502 games 36864 9月   8 2017 Source

drwxr-xr-x.   4 502 games  4096 9月   8 2017 Templates

drwxr-xr-x. 240 502 games 12288 9月   8 2017 Tests

drwxr-xr-x.  21 502 games  4096 9月   8 2017 Utilities

[root@mysql8018 cmake-3.9.2]# ./bootstrap --prefix=/usr

-- Performing Test run_inlines_hidden_test

-- Performing Test run_inlines_hidden_test - Success

-- Configuring done

-- Generating done

-- Build files have been written to: /root/cmake_new_dir/cmake-3.9.2

---------------------------------------------

CMake has bootstrapped.  Now run gmake.

[root@mysql8018 cmake-3.9.2]#

执行make

[root@mysql8018 cmake-3.9.2]# make

[100%] Linking C executable pseudo_tidy

[100%] Built target pseudo_tidy

Scanning dependencies of target foo

[100%] Building CXX object Tests/FindPackageModeMakefileTest/CMakeFiles/foo.dir/foo.cpp.o

[100%] Linking CXX static library libfoo.a

[100%] Built target foo

[root@mysql8018 cmake-3.9.2]#

执行make install

[root@mysql8018 cmake-3.9.2]# make install

-- Installing: /usr/share/cmake-3.9/editors/emacs/cmake-mode.el

-- Installing: /usr/share/aclocal/cmake.m4

-- Installing: /usr/share/cmake-3.9/completions/cmake

-- Installing: /usr/share/cmake-3.9/completions/cpack

-- Installing: /usr/share/cmake-3.9/completions/ctest

验证cmake 3.9

[root@mysql8018 cmake-3.9.2]# cmake -version

cmake version 3.9.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值