FileNotFoundError: [Errno 2] No such file or directory: 'make'
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
# 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/catkin.py", line 266, in main
catkin_main(sysargs)
File "/usr/lib/python3/dist-packages/catkin_tools/commands/catkin.py", line 261, in catkin_main
sys.exit(args.main(args) or 0)
File "/usr/lib/python3/dist-packages/catkin_tools/verbs/catkin_build/cli.py", line 273, in main
make_args, makeflags, cli_flags, jobserver = configure_make_args(
File "/usr/lib/python3/dist-packages/catkin_tools/argument_parsing.py", line 359, in configure_make_args
job_server.initialize(
File "/usr/lib/python3/dist-packages/catkin_tools/execution/job_server.py", line 305, in initialize
JobServer._gnu_make = GnuMake()
File "/usr/lib/python3/dist-packages/catkin_tools/execution/job_server.py", line 115, in __init__
if test_gnu_make_support():
File "/usr/lib/python3/dist-packages/catkin_tools/execution/job_server.py", 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/job_server.py", line 83, in test_gnu_make_support_common
ret = subprocess.call(['make', '-f', makefile, '-j2'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/usr/lib/python3.8/subprocess.py", line 340, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", 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_make
also fails, but a different error, which looks similar to what's reported in https://answers.ros.org/question/384705
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