nexus-cli icon indicating copy to clipboard operation
nexus-cli copied to clipboard

Failed to run protoc: No such file or directory (os error 2)

Open mkc0602 opened this issue 1 year ago • 7 comments

Quick deployment script throws error:

Environment:

OS: Ubuntu 22.04

curl https://cli.nexus.xyz/ | sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2048 100 2048 0 0 15847 0 --:--:-- --:--:-- --:--:-- 15875 rustc 1.81.0 (eeb90cda1 2024-09-04) /root/.nexus/network-api exists. Updating. No local changes to save HEAD is now at f26774a fix: auto-updater bug fixes (#75) Compiling nexus-network v0.3.7 (/root/.nexus/network-api/clients/cli) The following warnings were emitted during compilation:

warning: [email protected]: Failed to run protoc: No such file or directory (os error 2)

error: failed to run custom build command for nexus-network v0.3.7 (/root/.nexus/network-api/clients/cli)

Caused by: process didn't exit successfully: /root/.nexus/network-api/clients/cli/target/release/build/nexus-network-d12f3172b506ef1d/build-script-build (exit status: 1) --- stdout cargo:warning=Failed to run protoc: No such file or directory (os error 2)

--- stderr Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }

mkc0602 avatar Dec 09 '24 12:12 mkc0602

Whoever facing this, I have resolved this by creating a new user with sudo privileges. have tried it in 2 VMs with same spec.

Both triggered same error and after creating new sudo account , BOOM it worked.

mkc0602 avatar Dec 09 '24 13:12 mkc0602

brew install protobuf

run this cmd first

terryso avatar Dec 09 '24 15:12 terryso

the same problem, the protobuf is needed

sudo snap install protobuf

maybe this command should be added into the quick deployment script

lexburner avatar Dec 09 '24 15:12 lexburner

#On Debian run Sudo apt-get install -y protobuf-compiler #verify install Protoc —version

dapslegend avatar Dec 09 '24 20:12 dapslegend

#On Debian run Sudo apt-get install -y protobuf-compiler #verify install Protoc —version

install protoc success, it's libprotoc 3.6.1. But when I install nexus.xyz, it said

error: failed to run custom build command for nexus-network v0.4.0 (/root/.nexus/network-api/clients/cli)

Caused by: process didn't exit successfully: /root/.nexus/network-api/clients/cli/target/release/build/nexus-network-01d0541f667d1829/build-script-build (exit status: 1) --- stderr Error: Custom { kind: Other, error: "protoc failed: Unknown flag: --experimental_allow_proto3_optional\n" }

shipper96 avatar Dec 10 '24 04:12 shipper96

Command 'protoc' NOT found, you need to install it. Get a pkg from https://github.com/protocolbuffers/protobuf/releases for your os and install it. Then you will fix it

hbgld avatar Dec 10 '24 09:12 hbgld

I found the way. Just navigate to #111

shipper96 avatar Dec 10 '24 10:12 shipper96