wasphin edited a comment on issue #1170:
URL: https://github.com/apache/incubator-brpc/issues/1170#issuecomment-659183489


   > > `protoc` 和 `libprotobuf` 版本不一致
   > > > -- Found PROTOBUF: /usr/local/lib/libprotobuf.so
   
   cmake 找到的是你自己编译的 ``protobuf``(在 /usr/local 下)
   
   > [root@robot-release-1 _build]# protoc --version
   > libprotoc 2.5.0
   > [root@robot-release-1 _build]# which protoc
   > /usr/bin/protoc
   
   而 ``protoc`` 是系统自带的, 两个版本不一致.
   
   保持 ``protoc`` 和 ``libprotobuf.so`` 版本一致就可以, 要么都使用系统提供的, 要么都使用自己编译的.
   
   ``/usr/local/bin`` 下应该也有自己编译的 ``protoc``, 可以考虑卸载掉系统自带的 ``protobuf`` 相关包:
   ```
   yum remove -y  protobuf-compiler
   ```
   或者修改 ``PATH`` 变量把 ``/usr/local/bin`` 放到前面, 如:
   ```
   export PATH=/usr/local/bin:$PPATH
   ```
   然后再进行编译, 编译前可以把 ``CMakeCache.txt`` 删掉, 重新执行编译步骤.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org

Reply via email to