MATLAB cannot find CMake on Ubuntu 20.04

31 ビュー (過去 30 日間)
Phil Pesce
Phil Pesce 2022 年 3 月 25 日
コメント済み: Phil Pesce 2022 年 3 月 28 日
Hello! I've installed MATLAB 2021a into /usr/local/MATLAB/R2021a on my Ubuntu machine. I've also installed gcc, g++, and CMake (3.16.3). I am trying to use the RTI Connext DDS block set, which for some reason requires CMake even to only generate code. I've also installed RTI's toolchain, which provides the necessary commands/tools.
In a terminal, cmake -version returns the expected value, which seems to suggest the PATH was setup correctly (maybe?). cmake is installed in /usr/bin//cmake. In MATLAB, when I generate the Simulink model with the DDS blocks, I get an error that CMake is not found. Searching the web, it was suggested using the following command in MATLAB:
>> system('cmake --version')
cmake: /usr/local/MATLAB/R2021a/bin/glnxa64/libcurl.so.4: version `CURL_OPENSSL_4' not found (required by cmake)
cmake: /usr/local/MATLAB/R2021a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by cmake)
cmake: /usr/local/MATLAB/R2021a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /lib/x86_64-linux-gnu/libjsoncpp.so.1)
Doesn't look good. I'm not sure what the next step is, and everything else I've seen says to break symbolic links. I'm not thrilled with that idea, as eventually I'm going to have to rebuild my setup in a Docker container.
Help?
Thanks!

回答 (1 件)

Mark McBroom
Mark McBroom 2022 年 3 月 28 日
Is R2021b or R2022a an option? We began shipping cmake with MATLAB in those releases so there is no need to install cmake separately.
If you are stuck on 21a, best guess is that the cmake version you installed is too old. Can you try installing the latest version of cmake using apt?
  1 件のコメント
Phil Pesce
Phil Pesce 2022 年 3 月 28 日
Thanks, Mark!
Currently stuck on 21a, but your recommendation worked. Ubuntu apt package manager was installing CMake 3.16, which was the root cause.
I uninstalled CMake 3.16 and installed 3.22 and everything works now.
https://graspingtech.com/upgrade-cmake/

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by