2

I'm getting the following messages and error when running anchor test in Kali Linux:

anchor test                                                                                         
BPF SDK: /home/kali/.local/share/solana/install/releases/1.9.5/solana-release/bin/sdk/bpf
cargo-build-bpf child: rustup toolchain list -v
cargo-build-bpf child: cargo +bpf build --target bpfel-unknown-unknown --release
/home/kali/.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'm using the versions:

solana-cli 1.9.5
cargo and rustc 1.68.0
anchor-cli 0.26.0
node 16.19.1
openssl 3.0.8

I'm running the test in the sample project created with anchor init. Tried installing an Ubuntu version of libssl but it didn't work. Already installed libssl-dev, which is in the folder /usr/lib/x86_64-linux-gnu/libssl.so.3, but the problem still persists.

Any suggestion? TIA!

0

1 Answer 1

2

Try downgrading solana-cli to a stable version with sh -c "$(curl -sSfL https://release.solana.com/v1.14.10/install)"

Edit: This should probably have come first, but re-install openssl with:

wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb

and then:

sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb

Source here

2
  • Unfortunately, it didn't work, @Ademola : anchor test. Warning: cargo-build-bpf is deprecated. Please, use cargo-build-sbf. cargo-build-bpf child: /home/kali/.local/share/solana/install/active_release/bin/cargo-build-sbf --arch bpf. info: uninstalling toolchain 'bpf'. info: toolchain 'bpf' uninstalled. /home/kali/.rustup/toolchains/bpf/bin/cargo: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory. Do you know any other thing that could cause this error?
    – Lano
    Commented Mar 15, 2023 at 12:44
  • 1
    I updated my answer
    – Ademola
    Commented Mar 16, 2023 at 9:17

Not the answer you're looking for? Browse other questions tagged or ask your own question.