cmakedependenciesdwarfzstd

Could NOT find ZSTD (missing: ZSTD_LIBRARY ZSTD_INCLUDE_DIR)


I had an issue while installing headptrack with CMake when running cmake -DCMAKE_BUILD_TYPE=Release .. in heaptrack/build

-- Could NOT find ZSTD (missing: ZSTD_LIBRARY ZSTD_INCLUDE_DIR) 
CMake Error at 3rdparty/libbacktrace/CMakeLists.txt:160 (message):
  Could not find dwarf.h, try installing the dwarf or elfutils development
  package.


-- Configuring incomplete, errors occurred!

Solution

  • The solution is to install the zstd dev package instead of the regular, here is the command:

    sudo apt install -y libzstd-dev
    

    The solution with the dwarf dev package for the second error:

    sudo apt install libdwarf-dev