0

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

same problem with anchor.enter image description here

i have located libssl0.1.1 there will it help me?enter image description here

g.georgecccc
  • 75
  • 1
  • 6

3 Answers3

1

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.

Jon C
  • 7,019
  • 10
  • 17
1

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

0

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.

g.georgecccc
  • 75
  • 1
  • 6
  • oh only reinstalling linux, no biggie LOL What command did you use to install cargo when it worked? – niico Aug 10 '22 at 13:29