Ask Your Question

Could not find 'cmake' executable

asked 2020-09-01 18:28:45 -0600

cruddybanana1102 gravatar image

updated 2020-09-02 02:00:41 -0600

gvdhoorn gravatar image

ROS version= ROS2 Foxy Fitzroy (with these instructions for installation. I'm not sure of the packages used, but the prerequisites listed are chocolatey, Visual Studio 2019, cmake and the likes that you will find on the link.)

OS = WIndows 10 Home Single Language; Version: 2004; OS build: 19041.450;

When executing the colcon build --merge-install command

The error reads:

Traceback (most recent call last):
  File "c:\python38\lib\site-packages\colcon_core\executor\", line 91, in __call__
    rc = await self.task(*args, **kwargs)

  File "c:\python38\lib\site-packages\colcon_core\task\", line 93, in __call__
    return await task_method(*args, **kwargs)

  File "c:\python38\lib\site-packages\colcon_cmake\task\cmake\", line 87, in build
    rc = await self._reconfigure(args, env)

  File "c:\python38\lib\site-packages\colcon_cmake\task\cmake\", line 172, in _reconfigure
    raise RuntimeError("Could not find 'cmake' executable")

RuntimeError: Could not find 'cmake' executable
Failed   <<< CARLA [0.05s, exited with code 1]
Aborted  <<< gym [0.01s]

Summary: 0 packages finished [5.11s]
  1 package failed: CARLA
  1 package aborted: gym
  1 package had stderr output: CARLA
Could not find 'cmake' executable

The error reads that it could not find the cmake executable. I checked the files in the Traceback via GUI that a cmake folder exists in the desired trajectories with _pycache_ folder, and , , scripts present in it. Should I try to build CMake again from the source tree? I am not sure. please help.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-11-22 16:20:24 -0600

zchenpds gravatar image

It is complaining that "cmake.exe" cannot be found. If you have installed cmake using choco install -y cmake, you want to update the environment variable PATH to, e.g., C:\Program Files\CMake\bin.

edit flag offensive delete link more


Works perfectly.

JollyRogers gravatar image JollyRogers  ( 2021-10-14 17:03:46 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-09-01 18:23:23 -0600

Seen: 1,126 times

Last updated: Sep 02 '20