Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could NOT find Protobuf (missing: Protobuf_PROTOC_EXECUTABLE)

When I am doing a cmake in the build directory of the project I am getting this error. Initially I got a

protobuf-config.cmake not found

error. So I gave a path of the protobuf-config.cmake file to Protobuf_DIR. Later it started to show this new error:

CMake Error at /opt/cmake/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find Protobuf (missing: Protobuf_PROTOC_EXECUTABLE)

(found suitable version "3.6.1", minimum required is "3.0.0")

I am also attaching the error log file: https://drive.google.com/open?id=1y7BZ6lDBtxvla7r-o188xM_FjwLqwhCx

I am doing this on Ubuntu-18 with cmake version: 3.13 and protobuf version: 3.6.1

like image 717
Check Avatar asked Mar 07 '19 09:03

Check


1 Answers

You probably don't have the Protobuf compiler and development files installed. To fix that, run this command:

sudo apt-get install protobuf-compiler libprotobuf-dev

Alternatively, if you're building Protobuf by hand, you can't build it with the build type as RelWithDebInfo because that causes issues with the library and CMake.

like image 111
S.S. Anne Avatar answered Oct 15 '22 05:10

S.S. Anne