sgerrand / alpine-pkg-glibc

A glibc compatibility layer package for Alpine Linux
2.04k stars 280 forks source link

ERROR: glibc-2.35-r0: trying to overwrite etc/nsswitch.conf owned by alpine-baselayout-data-3.3.0-r2. #185

Closed andrewrothstein closed 1 year ago

andrewrothstein commented 1 year ago

stopped working with alpine:3.16 and alpine:edge.

NoCoker commented 1 year ago

Same here but works until last week with 3.16 without edge repository ! Now also: ERROR: glibc-2.35-r0: trying to overwrite etc/nsswitch.conf owned by alpine-baselayout-data-3.2.0-r23

Maybe it helps to locate the error

jaguwalapratik commented 1 year ago

Started getting same error, however it's other way around.

ERROR: alpine-baselayout-data-3.2.0-r23: trying to overwrite etc/nsswitch.conf owned by glibc-2.32-r0.

RaulBMG commented 1 year ago

I am having a similar issue with these libraries, with different glibc versions [ 2.31, 2.35 ], and it seems related to this Commit:

https://git.alpinelinux.org/aports/commit/?h=3.16-stable&id=348653a9ba0701e8e968b3344e72313a9ef334e4

Update: I have managed to do a different Workaround, by forcing the previous version of alpine-baselayout, like this, before running apk -U upgrade:

+ apk add alpine-baselayout=3.2.0-r22
  apk -U upgrade
strainovic commented 1 year ago

Same issue here :(

GregGuiver commented 1 year ago

+1

alejandro-serrano commented 1 year ago

We are facing the same issue.

Trass3r commented 1 year ago

apk add --force-overwrite works around it.

mattduguid commented 1 year ago

We havent changed our pipeline or glibc version we still set to,

ARG VERSION_GLIBC=2.34-r0

Our pipeline was working on monday 12/09 NZT,

(1/3) Installing glibc (2.34-r0)
(2/3) Installing glibc-bin (2.34-r0)
(3/3) Installing glibc-i18n (2.34-r0)

but failing on tuesday 13/09 NZT,

(1/3) Installing glibc (2.34-r0)
ERROR: glibc-2.34-r0: trying to overwrite etc/nsswitch.conf owned by alpine-baselayout-data-3.2.0-r23.
(2/3) Installing glibc-bin (2.34-r0)
(3/3) Installing glibc-i18n (2.34-r0)

Can confirm the workaround also unblocking us for now thanks @Trass3r

mikecurrancs commented 1 year ago

I am having the same issue using an older version of glibc (2.23-r3)

djq183u commented 1 year ago

+1 on this issue with glibc-2.29

0free commented 1 year ago

Hi, still the error exists with version 2.35-r0

ERROR: glibc-2.35-r0: trying to overwrite etc/nsswitch.conf owned by alpine-baselayout-data-3.3.0-r2

I think the only option is to force overwrite

sudo apk add --force-overwrite glibc-2.35-r0.apk
sudo apk fix --force-overwrite alpine-baselayout-data
b01 commented 1 year ago

apk add --force-overwrite works around it.

This works! Nicely it changes the ERROR to a WARNING so it doesn't hide the fact the issue is still there.

without --force-overwrite

 > [6/6] RUN apk add glibc-2.35-r0.apk:
#9 0.478 fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/x86_64/APKINDEX.tar.gz
#9 0.782 fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz
#9 1.169 (1/1) Installing glibc (2.35-r0)
#9 1.170 ERROR: glibc-2.35-r0: trying to overwrite etc/nsswitch.conf owned by alpine-baselayout-data-3.2.0-r23.
#9 1.219 1 error; 27 MiB in 48 packages

with --force-overwrite:

#10 [6/6] RUN apk add --force-overwrite glibc-2.35-r0.apk
#10 0.501 fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/x86_64/APKINDEX.tar.gz
#10 0.752 fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz
#10 1.112 (1/1) Installing glibc (2.35-r0)
#10 1.114 WARNING: glibc-2.35-r0: overwriting etc/nsswitch.conf owned by alpine-baselayout-data-3.2.0-r23.
#10 1.155 OK: 27 MiB in 48 packages
#10 DONE 1.3s
m1rm commented 1 year ago

I seem to experience the same issue with the following versions:

ERROR: glibc-2.29-r0: trying to overwrite etc/nsswitch.conf owned by alpine-baselayout-data-3.2.0-r23.

elia-slomka commented 1 year ago
 --force-overwrite

Works Indeed! Thank you

mattduguid commented 1 year ago

We have previously had this issue in sep 2022 https://github.com/sgerrand/alpine-pkg-glibc/issues/185#issuecomment-1245999723 when using following version,

ARG VERSION_GLIBC=2.34-r0

Recently we upgraded to,

ARG VERSION_GLIBC=2.35-r0

And we now have the issue back again, but we still have the workaround in from last time but not having same effect,

(1/6) Installing glibc (2.35-r0)
WARNING: glibc-2.35-r0: overwriting etc/nsswitch.conf owned by alpine-baselayout-data-3.2.0-r23.

Anyone seen similar?

BlueFalconHD commented 1 year ago

Weird. Using force-overwrite doesn't fix this issue for me at all:

blue:~# apk add --force-overwrite glibc-2.35-r0.apk
1 error; 111 MiB in 126 packages
sgerrand commented 1 year ago

Hi everyone and apologies for not having responded to all of your bug reports earlier. Forgive me. I've just released version 2.35-r1 of this package which resolves the cause of this issue. Please upgrade to it when you can.

chadlwilson commented 1 year ago

Thanks for looking at this @sgerrand .

If you're back in the "mood" for some alpine glibc, the 2.35 packages (including this 2.35-r1) still don't seem to install and work properly out-of-the-box due to #176, #175, #181 (and other duplicates) either without lib64 symlinking or other crude approaches like https://github.com/sgerrand/alpine-pkg-glibc/issues/175#issuecomment-1322395184. 2.34-r0 doesn't seem to have this issue.

sgerrand commented 1 year ago

Thanks for highlighting those points. I'm continuing work on this package this week to resolve those issues, along with updating the version of the GNU C library to the current release.

sgerrand commented 1 year ago

back in the "mood"

For transparency, some other things had got in the way of spending time on this project. I appreciate that a lot of projects, commercial or otherwise, depend on this Alpine package but until somebody decides to sponsor my time I can only offer "best effort" as a commitment.

If you'd like to change this then please click the "Sponsor" button at the top of the page and complete the workflow to enable me to spend more time supporting this project!

chadlwilson commented 1 year ago

Totally understood, and totally fair enough. I for one, appreciate the effort you've put in to this project thus far. Aside from this package's historical use within AdoptOpenJDK which I was aware of, for some messy reasons this is still used as part of Alpine container images for https://github.com/gocd/gocd - for which I am in a similar maintainer position with respect to "best efforts" :-)

Have been incrementally trying to understand a bit more here to evaluate the various options for creating aarch64/arm64 variants which I can't easily do at the moment. Anyway, sorry for the off-topic messages, and thanks again 🙏

andrewrothstein commented 1 year ago

@sgerrand the latest binaries you've offered work swimmingly for my use case. thank you for all of your efforts.

huqingcn commented 7 months ago

Installing glibc-bin-2.35-r1 still has the same problem, and it prevents me from installing other packages and updates.

sudo apk add glibc-bin-2.35-r1.apk glibc-dev-2.35-r1.apk glibc-i18n-2.
35-r1.apk glibc-2.35-r1.apk
1 error; 1672 MiB in 609 packages
peter-pc:~/Downloads/glibc$ sudo apk -U upgrade
fetch https://mirrors.ustc.edu.cn/alpine/latest-stable/main/x86_64/APKINDEX.tar.gz
fetch https://mirrors.ustc.edu.cn/alpine/latest-stable/community/x86_64/APKINDEX.tar.gz
1 error; 1672 MiB in 609 packages
peter-pc:~/Downloads/glibc$ sudo apk upgrade
1 error; 1672 MiB in 609 packages
peter-pc:~/Downloads/glibc$ sudo apk add nginx
(1/5) Installing hiredis (1.2.0-r0)
(2/5) Installing pcre (8.45-r3)
(3/5) Installing nginx (1.24.0-r14)
Executing nginx-1.24.0-r14.pre-install
Executing nginx-1.24.0-r14.post-install
(4/5) Installing nginx-openrc (1.24.0-r14)
(5/5) Installing nginx-vim (1.24.0-r14)
Executing busybox-1.36.1-r15.trigger
Executing glibc-bin-2.35-r1.trigger
1 error; 1674 MiB in 614 packages
b01 commented 7 months ago

@huqingcn Yea, the work-a-round is above. But here it is in practice, not ideal. But this glibc implementation is worth it: https://github.com/kohirens/docker-alpine-glibc/blob/059ea7f865953ca2c23fb6ea9b77845b7c86dbb2/Dockerfile#L19