Reputation: 85
rustc --version = rustc 1.60.0 (7737e0b5c 2022-04-04)
solana --version = solana-cli 1.10.8 (src:623ac656; feat:1122441720)
npm --version = 8.5.1
node --version = v12.22.9
os: ubuntu 22.04 lts
after i run: "npm run build:program-rust" i am getting this error.
/home/[user]/.rustup/toolchains/bpf/bin/cargo: error while loading shared libraries:libssl.so.1.1: cannot open shared object file: No such file or directory
i have located libssl0.1.1 there will it help me?
Upvotes: 0
Views: 1354
Reputation: 11
In my case, libssl was upgraded to version 2.19. So I fixed the issue by running the following commands:
wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb
Upvotes: 1
Reputation: 85
yes, cargo wasn't in a standard path. and fixed everything by reinstalling Linux. it was Ubuntu for testing. actually moved to Debian reinstalled packages and working properly.
Upvotes: 0
Reputation: 8412
Even though you have the shared object on your system, cargo build-bpf
is probably not finding it since it isn't in a standard path. You can try the solutions at How to I tell Rust where to look for a static library? to tell the linker where to find the library.
Upvotes: 1