Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error building npm run build:program-ruston NixOS - no subcommand build-bpf #450

Open
rollschild opened this issue Apr 7, 2022 · 4 comments

Comments

@rollschild
Copy link

Hi,

I'm a newbie in the Solana world and I was trying to build the project using npm run build:program-rust but got the following error:

> cargo build-bpf --manifest-path=./src/program-rust/Cargo.toml --bpf-out-dir=dist/program

error: no such subcommand: `build-bpf`

I'm using NixOS. All I installed was the package solana-testnet which is supposed to package the solana-cli.

From this issue I got to know somehow I need to install the solana-cargo-bpf package but as the comment said the package wasn't found.

$ cargo install solana-cargo-build-bpf                                                                                                                                                                     
    Updating crates.io index
error: could not find `solana-cargo-build-bpf` in registry `crates-io` with version `*`

Any help? Thanks!

@septemhill
Copy link

septemhill commented Apr 11, 2022

#444 just report the issue and closed. But the solution doesn't work for me. I used the same environment setting (rust version, solana version). But I installed solana by cargo install.

I just re-install solana few minutes ago (follow the doc https://docs.solana.com/cli/install-solana-cli-tools), then it works now. It seems use cargo install to install solana would lost something .... If you install solana by cargo, you could try this way.

@geofflangenderfer
Copy link

@septemhill I did the same!

give official docs a shot @rollschild

@jstarry
Copy link
Member

jstarry commented Apr 11, 2022

AFAIK it's not possible to install the build-bpf subcommand using cargo, you have to install precompiled binaries using the docs linked above or build and install from source using scripts/cargo-install-all.sh

@itayLev1
Copy link

itayLev1 commented May 23, 2023

Try this one, not sure, but it might solve this issue,
basicaly reversing the shared folder managment system to an older version.
You will always be able to bring back a newer version if you'd like (using the same comands with another link).
This problem tends to happen with the Solana interface.

solution:
run these in CLI:
1) download file from the link
wget https://packages.ubuntu.com/focal/amd64/libssl1.1/download
2) then install it using:
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.18_amd64.deb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants