出现的问题主要是没有xdr.h
: /usr/include/rpc/rpc.h:43:10: fatal error: rpc/xdr.h: No such file or directory
#include <rpc/xdr.h> /* generic (de)serializer */
compilation terminated. make[2]: *** [plugin/group_replication/libmysqlgcs/CMakeFiles/mysqlgcs.dir/build.make:99:plugin/group_replication/libmysqlgcs/CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/pax_msg.cc.o] 错误 1 make[1]: *** [CMakeFiles/Makefile2:9683:plugin/group_replication/libmysqlgcs/CMakeFiles/mysqlgcs.dir/all] 错误 2 make: *** [Makefile:166:all] 错误 2
解决方法:
方法1
# 对于基于Debian的系统
sudo apt-get install rpcbind libtirpc-dev
# 对于基于Red Hat的系统
sudo yum install rpcbind libtirpc-devel
法一无效的情况下用法二
export LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH
法二无效用法三
cmake . -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/boost_1_59_0
make
make install