I'm installing Solana on WSL following this guide: https://github.com/LearnWithArjun/solana-env-setup/blob/main/mac_or_linux_setup.md

When I come to 'anchor test' I get this error: anchor test

BPF SDK: /home/nick/.local/share/solana/install/releases/1.13.0/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/me/.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 tried this: https://github.com/tauri-apps/tauri/issues/4470

sudo apt install lsb

Didn't help.

This also doesn't seem to help https://unix.stackexchange.com/questions/421153/finding-libssl-on-a-customers-linux#421164

ldconfig -p|grep ssl

I also tried this which seemed to install fine, but didn't help anchor test:

sudo apt install libssl

How can I get anchor test to work?

2 Answers 2


You almost had it, but you are trying to install the incorrect program.

Inside of your WSL terminal, try installing the libssl-dev package and a few others:

sudo apt-get install -y pkg-config build-essential libudev-dev libssl-dev

If this still does not work, you can try to install the specific version of the libssl binary with these command:

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

PS: Great name! ;)

  • I should have said, already tried that, doesn't help.
    – niico
    Sep 14, 2022 at 8:04
  • 1
    haha yeah great name too
    – niico
    Sep 14, 2022 at 8:06
  • Gotcha, I just updated my response with the packages I had to install to get my setup working inside of Linux. Try giving those a try!
    – nickfrosty
    Sep 14, 2022 at 18:06
  • Just tried that, still didn't fix it :(
    – niico
    Sep 15, 2022 at 0:48
  • Try this updated method of manually installing the libssl version 1.1 binary
    – nickfrosty
    Sep 23, 2022 at 0:07

I was facing the same error and I came across this command hope it helps Sudo apt-get install libssl-dev


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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