tikv 源码编译 失败 error: failed to run custom build command for `protobuf-src v1.1.0+21.5`

tikv 源码编译 失败
yum install openssl openssl-devel -y

Install protobuf-devel rpm package:
dnf install protobuf-compiler
dnf --enablerepo=powertools install protobuf-devel

来源:
https://centos.pkgs.org/8-stream/centos-powertools-x86_64/protobuf-devel-3.5.0-15.el8.x86_64.rpm.html
https://centos.pkgs.org/8-stream/centos-appstream-x86_64/protobuf-compiler-3.5.0-15.el8.x86_64.rpm.html

git 免密设置
cat ~/.ssh/id_rsa.pub

git clone https://github.com/watchpoints/tikv.git
git submodule update --init --recursive

cargo build

error: failed to run custom build command for `protobuf-src v1.1.0+21.5

https://github.com/tari-project/tari/issues/1781

里面有一条评论的解决方法有11个赞,我虽然没试过,但应该有点东西吧,你试试看。
也是rust+protobuf的错误。

1 个赞

为什么不直接安装。

感觉是防火墙阻塞了

4g 虚拟机最后编译90% 编译不东了

依赖:How To Install snappy-devel on CentOS 8
snappy可以用yum装,有的CentOS版本,没有直接装snappy-dev的包
sudo dnf makecache --refresh
dnf search snappy
sudo dnf install snappy.x86_64

sudo dnf install csnappy.x86_64
sudo dnf install csnappy-devel.x86_64
 
 sudo dnf install cmake



、

依赖: build-essential

yum update # 可以不执行
yum groupinstall "Development Tools"

依赖: openssl
yum install openssl openssl-devel -y
dnf --enablerepo=powertools install protobuf-devel



Centos安装Protobuf:
 yum install git
cargo install protobuf-codegen
cargo install grpcio-compiler

或者
https://github.com/protocolbuffers/protobuf/releases/download/v25.2/protoc-25.2-linux-x86_64.zip
cp -rf bin /bin
cp -rf include/ /usr/local/

dnf install cmake

git 免密设置
ssh-keygen
ssh-copy-id root@127.0.0.1 
cat ~/.ssh/id_rsa.pub


git clone https://github.com/watchpoints/tikv.git
git submodule update --init --recursive


rm -rf ~/.cargo/.package-cache

make build
或者cargo build

直接把我虚机编译无法登录了崩溃了
改为2g云服务器。 根本编译不动。

自己有改源码吗?安装一下build-essential autoconf libtool这三个依赖试试。

1 个赞

此话题已在最后回复的 60 天后被自动关闭。不再允许新回复。