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

Error relocating /usr/lib/libcurl.so.4: SSL_get0_group_name: symbol not found #383

Open
exfly opened this issue Mar 27, 2024 · 5 comments
Open

Comments

@exfly
Copy link

exfly commented Mar 27, 2024

docker run --rm -it registry-1.docker.io/library/alpine:edge sh -c 'cat /etc/os-release && apk add curl && curl bing.com'
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.20.0_alpha20240315
PRETTY_NAME="Alpine Linux edge"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"
fetch https://dl-cdn.alpinelinux.org/alpine/edge/main/aarch64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/edge/community/aarch64/APKINDEX.tar.gz
(1/10) Installing ca-certificates (20240226-r0)
(2/10) Installing brotli-libs (1.1.0-r1)
(3/10) Installing c-ares (1.27.0-r0)
(4/10) Installing libunistring (1.2-r0)
(5/10) Installing libidn2 (2.3.7-r0)
(6/10) Installing nghttp2-libs (1.60.0-r0)
(7/10) Installing libpsl (0.21.5-r1)
(8/10) Installing zstd-libs (1.5.5-r9)
(9/10) Installing libcurl (8.6.0-r1)
(10/10) Installing curl (8.6.0-r1)
Executing busybox-1.36.1-r21.trigger
Executing ca-certificates-20240226-r0.trigger
OK: 13 MiB in 24 packages
Error relocating /usr/lib/libcurl.so.4: SSL_get0_group_name: symbol not found

tmp workaround:

apk update && apk upgrade
@tianon
Copy link
Contributor

tianon commented Mar 27, 2024

Due to it being a linker error, even just curl --version fails (and I don't think it's limited to just curl either, that's just a high-profile and obvious example) 😭

I think the underlying cause is this:

$ docker run --rm --pull=always alpine:edge apk list --upgradeable --no-cache libssl3
edge: Pulling from library/alpine
Digest: sha256:67b8a3c4c19bbdd43de723881bc536758f5e780f8d32ef8f5ef2b72f769a3e78
Status: Image is up to date for alpine:edge
fetch https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
libssl3-3.2.1-r1 x86_64 {openssl} (Apache-2.0) [upgradable from: libssl3-3.1.5-r5]

I'm not sure what standard practice is in the Alpine packaging ecosystem, but I think this update probably should include a versioned dependency for any package (re)built against it to ensure it gets updated if they get installed? Alternatively, a fresh rebuild of alpine:edge should also make this go away.

@tianon
Copy link
Contributor

tianon commented Mar 27, 2024

It goes deeper than just libssl3, so the rebuild solution is probably the most tenable:

$ docker run -it --rm --pull=always alpine:edge
edge: Pulling from library/alpine
Digest: sha256:67b8a3c4c19bbdd43de723881bc536758f5e780f8d32ef8f5ef2b72f769a3e78
Status: Image is up to date for alpine:edge
/ # apk update --quiet
/ # apk add curl
(1/10) Installing ca-certificates (20240226-r0)
(2/10) Installing brotli-libs (1.1.0-r1)
(3/10) Installing c-ares (1.27.0-r0)
(4/10) Installing libunistring (1.2-r0)
(5/10) Installing libidn2 (2.3.7-r0)
(6/10) Installing nghttp2-libs (1.60.0-r0)
(7/10) Installing libpsl (0.21.5-r1)
(8/10) Installing zstd-libs (1.5.6-r0)
(9/10) Installing libcurl (8.6.0-r1)
(10/10) Installing curl (8.6.0-r1)
Executing busybox-1.36.1-r21.trigger
Executing ca-certificates-20240226-r0.trigger
OK: 13 MiB in 24 packages
/ # curl --version
Error relocating /usr/lib/libcurl.so.4: SSL_get0_group_name: symbol not found
/ # apk upgrade libssl3
(1/1) Upgrading libssl3 (3.1.5-r5 -> 3.2.1-r1)
OK: 13 MiB in 24 packages
/ # curl --version
Error relocating /lib/libssl.so.3: BIO_err_is_non_fatal: symbol not found
Error relocating /lib/libssl.so.3: BIO_s_dgram_mem: symbol not found
Error relocating /lib/libssl.so.3: OSSL_STACK_OF_X509_free: symbol not found
Error relocating /lib/libssl.so.3: OSSL_ERR_STATE_restore: symbol not found
Error relocating /lib/libssl.so.3: ERR_count_to_mark: symbol not found
Error relocating /lib/libssl.so.3: BIO_get_rpoll_descriptor: symbol not found
Error relocating /lib/libssl.so.3: BIO_get_wpoll_descriptor: symbol not found
Error relocating /lib/libssl.so.3: BIO_recvmmsg: symbol not found
Error relocating /lib/libssl.so.3: OSSL_ERR_STATE_save: symbol not found
Error relocating /lib/libssl.so.3: X509_STORE_CTX_init_rpk: symbol not found
Error relocating /lib/libssl.so.3: OSSL_ERR_STATE_new: symbol not found
Error relocating /lib/libssl.so.3: OSSL_ERR_STATE_free: symbol not found
Error relocating /lib/libssl.so.3: BIO_sendmmsg: symbol not found
Error relocating /lib/libssl.so.3: OSSL_ERR_STATE_save_to_mark: symbol not found
/ # apk upgrade libcrypto3
Error relocating /lib/libssl.so.3: BIO_err_is_non_fatal: symbol not found
Error relocating /lib/libssl.so.3: BIO_s_dgram_mem: symbol not found
Error relocating /lib/libssl.so.3: OSSL_STACK_OF_X509_free: symbol not found
Error relocating /lib/libssl.so.3: OSSL_ERR_STATE_restore: symbol not found
Error relocating /lib/libssl.so.3: ERR_count_to_mark: symbol not found
Error relocating /lib/libssl.so.3: BIO_get_rpoll_descriptor: symbol not found
Error relocating /lib/libssl.so.3: BIO_get_wpoll_descriptor: symbol not found
Error relocating /lib/libssl.so.3: BIO_recvmmsg: symbol not found
Error relocating /lib/libssl.so.3: OSSL_ERR_STATE_save: symbol not found
Error relocating /lib/libssl.so.3: X509_STORE_CTX_init_rpk: symbol not found
Error relocating /lib/libssl.so.3: OSSL_ERR_STATE_new: symbol not found
Error relocating /lib/libssl.so.3: OSSL_ERR_STATE_free: symbol not found
Error relocating /lib/libssl.so.3: BIO_sendmmsg: symbol not found
Error relocating /lib/libssl.so.3: OSSL_ERR_STATE_save_to_mark: symbol not found
/ # # oops, now apk itself is broken 🙈

chris-olszewski added a commit to vercel/turborepo that referenced this issue Apr 24, 2024
### Description

Changes:
- Upgrade `curl` version to avoid
alpinelinux/docker-alpine#383
- Do `PATH` alterations in build step as for some reason the alpine
container doesn't respect alterations from previous steps.
- Remove `rustup toolchain install` commands as this would require
parsing TOML to extract the Rust version we want. Instead we rely on the
behavior of `rustup show` which will install the toolchain override if
it isn't installed yet.

### Testing Instructions

Dry run: https://github.com/vercel/turbo/actions/runs/8808289531


Closes TURBO-2869
@fossdd
Copy link

fossdd commented Jul 1, 2024

works on my end now. could you try apk upgrade -a?

@yosifkit
Copy link

yosifkit commented Jul 1, 2024

This was "fixed" by the alpine:edge snapshot rebuild on 20240606 (docker-library/official-images#16939). The answer is to use a newer alpine:edge image (or apk upgrade -a before installing new packages in edge).

nexus-uw added a commit to nexus-uw/docker-pleroma that referenced this issue Jul 6, 2024
@thehowl
Copy link

thehowl commented Oct 29, 2024

FWIW, I solved this by adding openssl to my apk add list.

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

No branches or pull requests

5 participants