0

I'm new to Linux and Solana development, I'm following this Solana tutorial:

https://dev.to/edge-and-node/the-complete-guide-to-full-stack-solana-development-with-react-anchor-rust-and-phantom-3291

When I get to anchor build I get this error:

BPF SDK: /home/niico/.local/share/solana/install/releases/1.10.34/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/myname/.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 thought I may have to install some libssl or something - so tried this:

sudo apt install pkg-config libssl-dev

But it appears to install and doesn't fix the problem with anchor build.

I could keep guessing but the tutorial says it should work at this point and I don't want to guess the correct way to do this because I'll probably get into bad habits.

Why is the error happening and how can I get anchor build to work?

Thanks

niico
  • 11,206
  • 23
  • 78
  • 161
  • Note - I just nuked and paved - started with a clean Ubuntu install. I think I may have had some old versions of packages I needed in there. – niico Aug 17 '22 at 10:57

1 Answers1

1

This is a common issue if you're using a newer version of Ubuntu. Check out this answer for how to install libssl 1.1.1: Ubuntu 22.04 | libssl.so.1.1: cannot open shared object file: No such file or directory

Jon C
  • 7,019
  • 10
  • 17