alpine-pkg-glibc icon indicating copy to clipboard operation
alpine-pkg-glibc copied to clipboard

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

Open andrewrothstein opened this issue 3 years ago • 10 comments
trafficstars

stopped working with alpine:3.16 and alpine:edge.

andrewrothstein avatar Sep 12 '22 19:09 andrewrothstein

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

NoCoker avatar Sep 13 '22 06:09 NoCoker

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.

jaguwalapratik avatar Sep 13 '22 07:09 jaguwalapratik

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

RaulBMG avatar Sep 13 '22 07:09 RaulBMG

Same issue here :(

strainovic avatar Sep 13 '22 07:09 strainovic

+1

GregGuiver avatar Sep 13 '22 11:09 GregGuiver

We are facing the same issue.

alejandro-serrano avatar Sep 13 '22 12:09 alejandro-serrano

apk add --force-overwrite works around it.

Trass3r avatar Sep 13 '22 13:09 Trass3r

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

mattduguid avatar Sep 13 '22 22:09 mattduguid

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

mikecurrancs avatar Sep 14 '22 14:09 mikecurrancs

+1 on this issue with glibc-2.29

djq183u avatar Sep 18 '22 19:09 djq183u

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

0free avatar Sep 29 '22 08:09 0free

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

b01 avatar Oct 30 '22 17:10 b01

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.

m1rm avatar Nov 14 '22 07:11 m1rm

 --force-overwrite

Works Indeed! Thank you

elia-slomka avatar Nov 21 '22 10:11 elia-slomka

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?

mattduguid avatar Feb 10 '23 04:02 mattduguid

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

BlueFalconHD avatar Mar 25 '23 03:03 BlueFalconHD

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.

sgerrand avatar Apr 13 '23 15:04 sgerrand

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.

chadlwilson avatar Apr 13 '23 15:04 chadlwilson

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 avatar Apr 13 '23 15:04 sgerrand

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!

sgerrand avatar Apr 13 '23 15:04 sgerrand

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 🙏

chadlwilson avatar Apr 13 '23 16:04 chadlwilson

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

andrewrothstein avatar Apr 26 '23 21:04 andrewrothstein

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

huqingcn avatar Dec 15 '23 21:12 huqingcn

@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

b01 avatar Dec 16 '23 17:12 b01