Ask Your Question

FileNotFoundError: [Errno 2] No such file or directory: 'make'

asked 2021-08-20 13:45:39 -0600

130s gravatar image

# Issue catkin build fails on ros:noetic-ros-base.

$ docker pull ros:noetic-ros-base
noetic-ros-base: Pulling from library/ros
Digest: sha256:66ba20ba51d44779dff11f490b0f30ab04f8ca15935f32ea5f058f1ac011d84d
root@07979acfa2c3:/cws# history
 1  DIR=/cws && mkdir -p $DIR/src && apt update && apt install -y python3-catkin-tools
 7  cd $DIR && catkin init && catkin config --install
 9  source /opt/ros/noetic/setup.bash       
11  catkin build
Traceback (most recent call last):
  File "/usr/bin/catkin", line 33, in <module>
    sys.exit(load_entry_point('catkin-tools==0.7.1', 'console_scripts', 'catkin')())
  File "/usr/lib/python3/dist-packages/catkin_tools/commands/", line 266, in main
  File "/usr/lib/python3/dist-packages/catkin_tools/commands/", line 261, in catkin_main
    sys.exit(args.main(args) or 0)
  File "/usr/lib/python3/dist-packages/catkin_tools/verbs/catkin_build/", line 273, in main
    make_args, makeflags, cli_flags, jobserver = configure_make_args(
  File "/usr/lib/python3/dist-packages/catkin_tools/", line 359, in configure_make_args
  File "/usr/lib/python3/dist-packages/catkin_tools/execution/", line 305, in initialize
    JobServer._gnu_make = GnuMake()
  File "/usr/lib/python3/dist-packages/catkin_tools/execution/", line 115, in __init__
    if test_gnu_make_support():
  File "/usr/lib/python3/dist-packages/catkin_tools/execution/", line 110, in test_gnu_make_support
    return test_gnu_make_support_common(JOBSERVER_SUPPORT_MAKEFILE)
  File "/usr/lib/python3/dist-packages/catkin_tools/execution/", line 83, in test_gnu_make_support_common
    ret =['make', '-f', makefile, '-j2'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python3.8/", line 340, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib/python3.8/", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/", line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'make'

catkin_makealso fails, but a different error, which looks similar to what's reported in

root@609b91fd3266:/cws# rm -fr .catkin_tools/                     
root@609b91fd3266:/cws# catkin_make                                                                                                                            
Base path: /cws                                        
Source space: /cws/src                                            
Build space: /cws/build                                   
Devel space: /cws/devel                                
Install space: /cws/install                               
Creating symlink "/cws/src/CMakeLists.txt" pointing to "/opt/ros/noetic/share/catkin/cmake/toplevel.cmake"
#### Running command: "cmake /cws/src -DCATKIN_DEVEL_PREFIX=/cws/devel -DCMAKE_INSTALL_PREFIX=/cws/install -G Unix Makefiles" in "/cws/build"
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!               
See also "/cws/build/CMakeFiles/CMakeOutput.log".   
Invoking "cmake" failed
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-08-20 13:48:19 -0600

130s gravatar image

updated 2021-08-20 14:15:08 -0600

Looks like similar / the same background as

In my case, the issue went away after either:

  • switching the Docker image to ros:noetic-ros-core.
  • installing build-essential.
edit flag offensive delete link more

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: 2021-08-20 13:45:39 -0600

Seen: 400 times

Last updated: Aug 20