Can't find BOOST when trying to build Firmware

Whenever I try building PX4-Autopilot from VSCode according to this guide, I get the following error:

> Executing task: make px4_sitl_default sitl_gazebo <

[0/4] Performing configure step for 'sitl_gazebo'
-- install-prefix: /usr/local
-- cmake build type: RelWithDebInfo
-- Using C++17 standard
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find Boost (missing: Boost_INCLUDE_DIR system thread filesystem)
  (Required is at least version "1.58")
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.16/Modules/FindBoost.cmake:2179 (find_package_handle_standard_args)
  CMakeLists.txt:46 (find_package)

I have downloaded the latest version of the Firmware and set up all the libraries by running the bash file Tools/setup/ I am on ubuntu, if that matters.

Can you please help me fix this error?

You can use apt search boost to find candidate packages. Next, search that list for system, thread, and filesystem. You will need the -dev packages for each. That is the process I ran to create the following (untested):


git clone px4-community
cd px4-community/
git submodule update --init --recursive
sudo apt install \
        python3-pip \
        libboost-thread-dev \
        libboost-filesystem-dev \
        gazebo9 libopencv-dev \
        libeigen3-dev \
        libgstreamer1.0-dev \
pip3 install --user \
        jinja2 \
        empy \
        pyros-genmsg \
        toml \
        numpy \
        packaging \

I followed your advice, and also reinstalled gazebo using the script from the official website. It works now :]