example-helloworld icon indicating copy to clipboard operation
example-helloworld copied to clipboard

Rust build fails on Ubuntu 22.04 (cannot find libssl.so)

Open grapereader opened this issue 2 years ago • 14 comments

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

> [email protected] 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

grapereader avatar May 11 '22 18:05 grapereader

same problem here. did you fix?

giorgiocc avatar May 14 '22 14:05 giorgiocc

Nope. I had to switch to Ubuntu 20.04

grapereader avatar May 26 '22 01:05 grapereader

Getting this error as well and above fix returns a 404 while trying to fetch the file ^

bmeeder22 avatar Jun 16 '22 21:06 bmeeder22

wget nz2.archive got 404.

i found another souce.

http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1l-1ubuntu1_amd64.deb

quote:https://ubuntu.pkgs.org/21.10/ubuntu-main-amd64/libssl1.1_1.1.1l-1ubuntu1_amd64.deb.html

ZhoufangErqiangu avatar Jun 17 '22 12:06 ZhoufangErqiangu

一样的的问题,我也不行

ttwo22 avatar Jul 27 '22 06:07 ttwo22

Here is the solution to fix this: coral-xyz/anchor#1831

wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1l-1ubuntu1.2_amd64.deb
sudo dpkg -i libssl1.1_1.1.1l-1ubuntu1.2_amd64.deb

404 Not Found

ttwo22 avatar Jul 27 '22 06:07 ttwo22

Hi any one who found the solution to the above error on ubuntu 22.04 please?

Hashmozy avatar Jul 30 '22 15:07 Hashmozy

Hi any one who found the solution to the above error on ubuntu 22.04 please?

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

llgiant avatar Aug 01 '22 15:08 llgiant

No such file or directory anyway

Nok1luck1 avatar Aug 02 '22 09:08 Nok1luck1

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.

diwasdhungana avatar Aug 03 '22 23:08 diwasdhungana

http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openss

архив ставится?

llgiant avatar Aug 05 '22 04:08 llgiant

easier way its reinstall Ubuntu to version 20.04.On that version all work fine, even with installing Anchor i have no problem

Nok1luck1 avatar Aug 05 '22 12:08 Nok1luck1

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.deb sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb

rcolomina avatar Aug 15 '22 09:08 rcolomina

Thank you but I managed to solve this by installing LSB in my Ubuntu 22.04 by sudo apt install lsb

On Mon, Aug 1, 2022, 18:11 Bogdan Melnikovskiy @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/solana-labs/example-helloworld/issues/470#issuecomment-1201333457, or unsubscribe https://github.com/notifications/unsubscribe-auth/APR5N4JHLB6PPPWWNGAO5NLVW7SLNANCNFSM5VVYMDXA . You are receiving this because you commented.Message ID: @.***>

Hashmozy avatar Oct 11 '22 08:10 Hashmozy

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.

It works on my side too Thanks

Kartos102 avatar Oct 27 '22 16:10 Kartos102

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.

This works for me.

WhooperDar avatar Nov 25 '22 17:11 WhooperDar

Closing since there's a resolution to the problem. In the future, we don't use GitHub for developer support, and encourage you ask your question on the Solana Stack Exchange https://solana.stackexchange.com/ or some other developer support forum.

joncinque avatar Jan 11 '23 13:01 joncinque

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

berry-sol avatar Feb 25 '23 14:02 berry-sol

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/download 2) then install it using: sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.18_amd64.deb

itayLev1 avatar May 22 '23 15:05 itayLev1

This help! Thanks..

andresmgsl avatar Jun 07 '23 20:06 andresmgsl

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

alinkon0207 avatar Jun 21 '23 02:06 alinkon0207

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

Karlitoyo avatar Jun 24 '23 11:06 Karlitoyo