emqtt-bench 安装失败的问题

emqtt-bench 安装问题 安装提示,安装失败

sh: line 0: exec: cmake: not found
===> Hook for compile failed!

环境信息

  • EMQ X 版本:
  • 操作系统及版本:Centos 8.3
  • 其他
    make的时候报错:
[root@test local]# git clone https://github.com/emqx/emqtt-bench
Cloning into 'emqtt-bench'...
remote: Enumerating objects: 572, done.
remote: Counting objects: 100% (327/327), done.
remote: Compressing objects: 100% (184/184), done.
remote: Total 572 (delta 174), reused 234 (delta 107), pack-reused 245
Receiving objects: 100% (572/572), 2.36 MiB | 12.70 MiB/s, done.
Resolving deltas: 100% (308/308), done.
[root@test local]# cd emqtt-bench/
[root@test emqtt-bench]# make
/usr/local/emqtt-bench/rebar3 unlock
/usr/local/emqtt-bench/rebar3 compile
===> Verifying dependencies...
===> Fetching emqtt (from {git,"https://github.com/emqx/emqtt",{tag,"1.4.3"}})
===> Fetching getopt v1.0.1
===> Fetching quicer (from {git,"https://github.com/emqx/quic.git",{tag,"0.0.8"}})
===> Fetching cowlib v2.11.0
===> Skipping getopt v1.0.2 as an app of the same name has already been fetched
===> Fetching gun (from {git,"https://github.com/emqx/gun",{tag,"1.3.4"}})
===> Fetching snabbkaffe (from {git,"https://github.com/kafka4beam/snabbkaffe.git",
                      {ref,"2f2f6ad09b97e33ba66b195665cef17d04598abd"}})
===> Skipping cowlib (from {git,"https://github.com/ninenines/cowlib","2.8.0"}) as an app of the same name has                                                                                                                               already been fetched
Cloning into 'msquic'...
Note: switching to 'fdcc086a2ded0eeeb6b78cf473eb2425e2a4ef73'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

Submodule 'submodules/googletest' (https://github.com/google/googletest) registered for path 'submodules/google                                                                                                                              test'
Submodule 'submodules/openssl' (https://github.com/quictls/openssl.git) registered for path 'submodules/openssl                                                                                                                              '
Cloning into '/usr/local/emqtt-bench/_build/default/lib/quicer/msquic/submodules/googletest'...
Cloning into '/usr/local/emqtt-bench/_build/default/lib/quicer/msquic/submodules/openssl'...
From https://github.com/google/googletest
 * branch            e8512bc38c4c0060858c3306b0660a3f126aee30 -> FETCH_HEAD
Submodule path 'submodules/googletest': checked out 'e8512bc38c4c0060858c3306b0660a3f126aee30'
From https://github.com/quictls/openssl
 * branch              a6e9d76db343605dae9b59d71d2811b195ae7434 -> FETCH_HEAD
Submodule path 'submodules/openssl': checked out 'a6e9d76db343605dae9b59d71d2811b195ae7434'
Submodule 'boringssl' (https://boringssl.googlesource.com/boringssl) registered for path 'submodules/openssl/bo                                                                                                                              ringssl'
Submodule 'krb5' (https://github.com/krb5/krb5) registered for path 'submodules/openssl/krb5'
Submodule 'pyca.cryptography' (https://github.com/pyca/cryptography.git) registered for path 'submodules/openss                                                                                                                              l/pyca-cryptography'
Cloning into '/usr/local/emqtt-bench/_build/default/lib/quicer/msquic/submodules/openssl/boringssl'...
Cloning into '/usr/local/emqtt-bench/_build/default/lib/quicer/msquic/submodules/openssl/krb5'...
Cloning into '/usr/local/emqtt-bench/_build/default/lib/quicer/msquic/submodules/openssl/pyca-cryptography'...
From https://boringssl.googlesource.com/boringssl
 * branch            2070f8ad9151dc8f3a73bffaa146b5e6937a583f -> FETCH_HEAD
Submodule path 'submodules/openssl/boringssl': checked out '2070f8ad9151dc8f3a73bffaa146b5e6937a583f'
From https://github.com/krb5/krb5
 * branch            890ca2f401924cdcb88f493950b04700bbe52db3 -> FETCH_HEAD
Submodule path 'submodules/openssl/krb5': checked out '890ca2f401924cdcb88f493950b04700bbe52db3'
From https://github.com/pyca/cryptography
 * branch            09403100de2f6f1cdd0d484dcb8e620f1c335c8f -> FETCH_HEAD
Submodule path 'submodules/openssl/pyca-cryptography': checked out '09403100de2f6f1cdd0d484dcb8e620f1c335c8f'
sh: line 0: exec: cmake: not found
===> Hook for compile failed!

make: *** [Makefile:13: compile] Error 1
[root@test emqtt-bench]# git -version

master 分支上的 emqtt-bench 由于支持了 QUIC,所以在编译时需要依赖 cmake。
QUIC 目前还属于试验性功能,你可以切换到 0.3.3 的 Tag 上进行编译。