CMake: „Could not find a package configuration file provided by "gRPC"" beheben

Problem

Beim Bauen eines C++-Projekts mit gRPC-Abhängigkeit kann folgender Fehler auftreten:

cmake-grpc-not-found-error.txt
CMake Error at CMakeLists.txt:37 (find_package):
  Could not find a package configuration file provided by "gRPC" with any of
  the following names:

    gRPCConfig.cmake
    grpc-config.cmake

  Add the installation prefix of "gRPC" to CMAKE_PREFIX_PATH or set
  "gRPC_DIR" to a directory containing one of the above files.  If "gRPC"
  provides a separate development package or SDK, be sure it has been
  installed.

Lösung

Zur Behebung libgrpc-dev installieren — dieses Paket liefert die benötigten CMake-Konfigurationsdateien für gRPC:

install-grpc-dev.sh
sudo apt -y install libgrpc-dev

Ähnliche Beiträge nach Kategorie: C/C++