I'm got this error after running this command: ./scripts/cargo-install-all.sh .

error: failed to run custom build command for `prost-build v0.10.1`

I'm installing solana on m1 mac Anyone please help me with this.

enter image description here

1

There are 1 best solutions below

0
On

The prost-build crate compilation is failing because it can't find protocol-buffer implementation, and the crate build.rs tries to compile it via cmake (which you don't have installed).

I solved it by installing protocol-buffers directly, but since there are problems with the pre-compiled binary in M1 you have to compile it locally. It's simple:

git clone https://github.com/protocolbuffers/protobuf.git
cd protobuf

brew install autoconf
brew install automake
brew install Libtool

autoreconf -i
./autogen.sh
./configure
make
make check
sudo make install

export PATH=/opt/usr/local/bin:$PATH

This works!!!