example-helloworld: Rust build fails on Ubuntu 22.04 (cannot find libssl.so)
Following the README as written. Fails at the build:program-rust step. Seems to be looking for libssl but cannot find it…
dev@dev-vm-crypto:~/repos/example-helloworld$ npm run build:program-rust
> helloworld@0.0.1 build:program-rust
> cargo build-bpf --manifest-path=./src/program-rust/Cargo.toml --bpf-out-dir=dist/program
BPF SDK: /home/dev/.local/share/solana/install/releases/stable-157aa16c6b8b3f3d965680c87a8703047e475881/solana-release/bin/sdk/bpf
cargo-build-bpf child: rustup toolchain list -v
cargo-build-bpf child: rustup toolchain link bpf /home/dev/.local/share/solana/install/releases/stable-157aa16c6b8b3f3d965680c87a8703047e475881/solana-release/bin/sdk/bpf/dependencies/bpf-tools/rust
cargo-build-bpf child: cargo +bpf build --target bpfel-unknown-unknown --release
/home/dev/.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 libssl-dev installed, as well as other dependencies from root solana project: libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang cmake make
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 22 (1 by maintainers)
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
this works.
The version provided in the solution doesn’t exist anymore and you will now receive an error 404 page does not exists message.
try this version: wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb
This solved the problem for me on my Ubuntu 22.04 machine. Thanks.
wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.16_amd64.debsudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb404 Not Found
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.1l-1ubuntu1.2_amd64.deb
solved the issue
This dep has now been updated to
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
This help! Thanks…
The versions mentioned above didnt work for me. Found this version and it works fine now. THANKS to all those came before me (:
run these in CLI: 1) download file from the link
wget https://packages.ubuntu.com/focal/amd64/libssl1.1/download2) then install it using:sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.18_amd64.deb