Issues with protobuf while building the px4-autopilot

Hello,

I am experiencing strange behavior from my protobuf while building the px4-autopilot via command: ,make px4_sitl gz_x500’'. I have probably some technical difficulties with protobuf and I do not know, how can I solve it.
The version I get from sudo apt-get install libprotobuf-dev protobuf-compiler is 3.12.4. The error I get while building is:
- Could NOT find gz-transport (missing: gz-transport_DIR)
– Looking for gz-transport12 – found version 12.2.1
– Searching for dependencies of gz-transport12
CMake Warning at /home/luky/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.26/Modules/FindProtobuf.cmake:524 (message):
Protobuf compiler version 3.12.4 doesn’t match library version 4.25.0
Call Stack (most recent call first):
/usr/share/cmake/gz-cmake3/cmake3/FindGzProtobuf.cmake:34 (find_package)
/usr/lib/x86_64-linux-gnu/cmake/gz-transport12/gz-transport12-config.cmake:92 (find_package)
src/modules/simulation/gz_bridge/CMakeLists.txt:40 (find_package)

I have probably also installed somewhere via binary files the version of protoc 25.2, but getting the same result.
Does anyone have an Idea what is going on?

thank you.