Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker - build development binary in isolated container: error while loading shared libraries: libcrypto.so.1.1 #2657

Open
rc5hack opened this issue Apr 4, 2024 · 4 comments

Comments

@rc5hack
Copy link

rc5hack commented Apr 4, 2024

My system:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy

$ uname -a
Linux MYHOSTNAME 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

$ dpkg -l libssl-dev
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name             Version           Architecture Description
+++-================-=================-============-================================================
ii  libssl-dev:amd64 3.0.2-0ubuntu1.15 amd64        Secure Sockets Layer toolkit - development files

Building as stated here:

$ curl -s -L "https://github.com/allinurl/goaccess/archive/refs/heads/master.tar.gz" | tar -xz && cd goaccess-master

$ docker build -t goaccess/build.debian-10 -f Dockerfile.debian-10 .
[+] Building 1.1s (8/8) FINISHED                                                                                                             docker:default
 => [internal] load build definition from Dockerfile.debian-10                                                                                         0.0s
 => => transferring dockerfile: 456B                                                                                                                   0.0s
 => [internal] load metadata for docker.io/library/debian:10                                                                                           1.0s
 => [internal] load .dockerignore                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                        0.0s
 => [1/4] FROM docker.io/library/debian:10@sha256:f6b3b7c7b049c2c7d0f19ae988b4eac64fd8e127fa891c9de1d3cf3f8c33cad4                                     0.0s
 => CACHED [2/4] RUN apt-get update -qqq                                                                                                               0.0s
 => CACHED [3/4] RUN apt-get install -yqqq     autoconf     build-essential     clang     gettext     libmaxminddb-dev     libssl-dev     linux-headers-amd64     libncursesw5-dev     0.0s
 => CACHED [4/4] WORKDIR /goaccess                                                                                                                     0.0s
 => exporting to image                                                                                                                                 0.0s
 => => exporting layers                                                                                                                                0.0s
 => => writing image sha256:965b366d6d7a007ccd20b6afaa7dbbf480882fec26436ccc7ab94444ae4444d1                                                           0.0s
 => => naming to docker.io/goaccess/build.debian-10                                                                                                    0.0s

What's Next?
  1. Sign in to your Docker account → docker login
  2. View a summary of image vulnerabilities and recommendations → docker scout quickview

$ docker run -i --rm -v $PWD:/goaccess goaccess/build.debian-10 > goaccess
es.po: de.po:2: warning: header field 'Language-Team' missing in header
205 translated messages, 8 fuzzy translations, 16 untranslated messages.
de.po: 220 translated messages, 7 fuzzy translations, 2 untranslated messages.
uk.po: 220 translated messages, 5 fuzzy translations, 4 untranslated messages.
it.po: 221 translated messages, 3 fuzzy translations, 5 untranslated messages.
ru.po: 220 translated messages, 5 fuzzy translations, 4 untranslated messages.
fr.po: 209 translated messages, 8 fuzzy translations, 12 untranslated messages.
ja.po: 229 translated messages.
zh_CN.po: 217 translated messages, 4 fuzzy translations, 8 untranslated messages.
ko.po: 223 translated messages, 2 fuzzy translations, 4 untranslated messages.
sv.po: 223 translated messages, 4 fuzzy translations, 2 untranslated messages.
pt_BR.po: 206 translated messages, 6 fuzzy translations, 17 untranslated messages.

$ ls -l ./goaccess
-rwxr-xr-x 1 root root 2581920 Apr  4 12:28 ./goaccess

$ ./goaccess --help
./goaccess: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory

Seems that goaccess needs older version of libcrypto.so (1.1.x), that is present (3.x) in my Ubuntu 22.04.

Could libcrypto be "compiled into" goaccess binary? Or should I launch development goaccess binary inside Debian 10 container, where is was compiled?

@valankar
Copy link

Same error here on Debian 12.5

@allinurl
Copy link
Owner

allinurl commented Apr 20, 2024

@valankar, this is what I get on a vanilla bookworm setup. Are you encountering any errors during the source build? The problem has been resolved in the latest version 1.9.2 through the debian repository.

$ sudo apt update
$ sudo apt install libncurses-dev libssl-dev libmaxminddb-dev git build-essential autoconf gettext autopoint
$ git clone https://github.com/allinurl/goaccess.git
$ cd goaccess/
$ autoreconf -fiv
$ ./configure --enable-utf8 --enable-geoip=mmdb --with-getline --with-openssl
$ make
$ sudo make install

then:

vagrant@bookworm:~/goaccess$ ./goaccess --version
GoAccess - 1.9.2.
For more details visit: https://goaccess.io/
Copyright (C) 2009-2024 by Gerardo Orellana

Build configure arguments:
  --enable-utf8
  --enable-geoip=mmdb
  --with-getline
  --with-openssl

@allinurl
Copy link
Owner

@rc5hack, I've updated the Dockerfile, please give it a shot. It should now be compatible with Debian 12, considering that Debian 10 support is being phased out.

@allinurl allinurl changed the title Build development binary in isolated container: error while loading shared libraries: libcrypto.so.1.1 Docker - Isolated container - build development binary in isolated container: error while loading shared libraries: libcrypto.so.1.1 Apr 20, 2024
@allinurl allinurl changed the title Docker - Isolated container - build development binary in isolated container: error while loading shared libraries: libcrypto.so.1.1 Docker - build development binary in isolated container: error while loading shared libraries: libcrypto.so.1.1 Apr 20, 2024
@valankar
Copy link

@valankar, this is what I get on a vanilla bookworm setup. Are you encountering any errors during the source build? The problem has been resolved in the latest version 1.9.2 through the debian repository.

Sorry I was not clear. I meant that I couldn't do the Build in isolated container, running the container on my Debian 12.5 machine. I just tried again with the updated Dockerfile and it works now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants