Colcon building turtlesim failed

asked 2020-09-12 02:31:55 -0500

Someone0135 gravatar image

Hi!

I am following the ROS2 tutorials and got stuck on this page. Whenever I try to run the command:

colcon build --merge-install

I get the error:

    Starting >>> turtlesim
--- stderr: turtlesim
Traceback (most recent call last):
  File "c:\python38\lib\site-packages\colcon_core\executor\__init__.py", line 91, in __call__
    rc = await self.task(*args, **kwargs)
  File "c:\python38\lib\site-packages\colcon_core\task\__init__.py", line 93, in __call__
    return await task_method(*args, **kwargs)
  File "c:\python38\lib\site-packages\colcon_ros\task\ament_cmake\build.py", line 69, in build
    return await extension.build(
  File "c:\python38\lib\site-packages\colcon_cmake\task\cmake\build.py", line 87, in build
    rc = await self._reconfigure(args, env)
  File "c:\python38\lib\site-packages\colcon_cmake\task\cmake\build.py", line 172, in _reconfigure
    raise RuntimeError("Could not find 'cmake' executable")
RuntimeError: Could not find 'cmake' executable
---
Failed   <<< turtlesim [0.03s, exited with code 1]

Summary: 0 packages finished [0.22s]
  1 package failed: turtlesim
  1 package had stderr output: turtlesim
Could not find 'cmake' executable

I have cmake installed, but it is not in the default directory, could this be the problem? I tried searching online but couldn't find any answers, if anyone could help me solve this problem it would be greatly appreciated!

edit retag flag offensive close merge delete