0

Recently lambda/dotnet:8 switch over to amazonlinux:2023 instead of amazonlinux:2. As a result I can't install simply the native compilers directly inside the image.

Steps:

> docker pull public.ecr.aws/lambda/dotnet:8 > docker run --rm --entrypoint bash -it public.ecr.aws/lambda/dotnet:8 bash-5.2# dnf group install -y "Development Tools" This is microdnf, which implements subset of `dnf'. [...] error: Unknown command: 'group' 

Using:

# rpm -q microdnf microdnf-3.8.1-1.amzn2023.0.1.x86_64 

Is there a simple way to install plain yum or regular dnf over an existing microdnf setup ?


For example I cannot simply install yum over the existing microdnf setup:

% docker run --rm --entrypoint bash -it public.ecr.aws/lambda/dotnet:8 bash-5.2# dnf install yum Downloading metadata... error: Could not depsolve transaction; 1 problem detected: Problem: problem with installed package microdnf-dnf-3.10.0-2.amzn2023.0.1.x86_64 - package microdnf-dnf-3.10.0-2.amzn2023.0.1.x86_64 from @System conflicts with dnf provided by dnf-4.12.0-2.amzn2023.0.4.noarch from amazonlinux - package microdnf-dnf-3.10.0-2.amzn2023.0.1.x86_64 from amazonlinux conflicts with dnf provided by dnf-4.12.0-2.amzn2023.0.4.noarch from amazonlinux - package microdnf-dnf-3.8.1-1.amzn2023.0.1.x86_64 from amazonlinux conflicts with dnf provided by dnf-4.12.0-2.amzn2023.0.4.noarch from amazonlinux - package yum-4.12.0-2.amzn2023.0.4.noarch from amazonlinux requires dnf = 4.12.0-2.amzn2023.0.4, but none of the providers can be installed - conflicting requests - package yum-4.14.0-1.amzn2023.0.4.noarch from amazonlinux requires dnf = 4.14.0-1.amzn2023.0.4, but none of the providers can be installed - package microdnf-dnf-3.10.0-2.amzn2023.0.1.x86_64 from @System conflicts with dnf provided by dnf-4.14.0-1.amzn2023.0.4.noarch from amazonlinux - package microdnf-dnf-3.10.0-2.amzn2023.0.1.x86_64 from amazonlinux conflicts with dnf provided by dnf-4.14.0-1.amzn2023.0.4.noarch from amazonlinux - package microdnf-dnf-3.8.1-1.amzn2023.0.1.x86_64 from amazonlinux conflicts with dnf provided by dnf-4.14.0-1.amzn2023.0.4.noarch from amazonlinux - package yum-4.14.0-1.amzn2023.0.5.noarch from amazonlinux requires dnf = 4.14.0-1.amzn2023.0.5, but none of the providers can be installed - package microdnf-dnf-3.10.0-2.amzn2023.0.1.x86_64 from @System conflicts with dnf provided by dnf-4.14.0-1.amzn2023.0.5.noarch from amazonlinux - package microdnf-dnf-3.10.0-2.amzn2023.0.1.x86_64 from amazonlinux conflicts with dnf provided by dnf-4.14.0-1.amzn2023.0.5.noarch from amazonlinux - package microdnf-dnf-3.8.1-1.amzn2023.0.1.x86_64 from amazonlinux conflicts with dnf provided by dnf-4.14.0-1.amzn2023.0.5.noarch from amazonlinux 

Which is identical to:

bash-5.2# microdnf install yum error: Could not depsolve transaction; 1 problem detected: Problem: problem with installed package microdnf-dnf-3.10.0-2.amzn2023.0.1.x86_64 - package microdnf-dnf-3.10.0-2.amzn2023.0.1.x86_64 from @System conflicts with dnf provided by dnf-4.12.0-2.amzn2023.0.4.noarch from amazonlinux - package microdnf-dnf-3.10.0-2.amzn2023.0.1.x86_64 from amazonlinux conflicts with dnf provided by dnf-4.12.0-2.amzn2023.0.4.noarch from amazonlinux - package microdnf-dnf-3.8.1-1.amzn2023.0.1.x86_64 from amazonlinux conflicts with dnf provided by dnf-4.12.0-2.amzn2023.0.4.noarch from amazonlinux - package yum-4.12.0-2.amzn2023.0.4.noarch from amazonlinux requires dnf = 4.12.0-2.amzn2023.0.4, but none of the providers can be installed - conflicting requests - package yum-4.14.0-1.amzn2023.0.4.noarch from amazonlinux requires dnf = 4.14.0-1.amzn2023.0.4, but none of the providers can be installed - package microdnf-dnf-3.10.0-2.amzn2023.0.1.x86_64 from @System conflicts with dnf provided by dnf-4.14.0-1.amzn2023.0.4.noarch from amazonlinux - package microdnf-dnf-3.10.0-2.amzn2023.0.1.x86_64 from amazonlinux conflicts with dnf provided by dnf-4.14.0-1.amzn2023.0.4.noarch from amazonlinux - package microdnf-dnf-3.8.1-1.amzn2023.0.1.x86_64 from amazonlinux conflicts with dnf provided by dnf-4.14.0-1.amzn2023.0.4.noarch from amazonlinux - package yum-4.14.0-1.amzn2023.0.5.noarch from amazonlinux requires dnf = 4.14.0-1.amzn2023.0.5, but none of the providers can be installed - package microdnf-dnf-3.10.0-2.amzn2023.0.1.x86_64 from @System conflicts with dnf provided by dnf-4.14.0-1.amzn2023.0.5.noarch from amazonlinux - package microdnf-dnf-3.10.0-2.amzn2023.0.1.x86_64 from amazonlinux conflicts with dnf provided by dnf-4.14.0-1.amzn2023.0.5.noarch from amazonlinux - package microdnf-dnf-3.8.1-1.amzn2023.0.1.x86_64 from amazonlinux conflicts with dnf provided by dnf-4.14.0-1.amzn2023.0.5.noarch from amazonlinux 
5
  • Note the relatively low number of watchers for your tag(s). Try to find some other appropriate tags with higher numbers of watchers. A tag for a specific compiler orr yum or other tool? Maybe include a tag for your underlying OS (unix|linux|macOS|MSwin (only one!) ). Commented Jan 7 at 14:51
  • Duplicate of stackoverflow.com/a/58941339/3489429 Commented Jan 30 at 12:19
  • How in the world is this a duplicate ? Did you even try the commands on your side ? Commented Jan 31 at 14:03
  • 1
    @msuchy We don’t do cross site dupes. You could post an answer that refers to that answer if you wish, but note that the answer can only use the link as a supporting reference. Commented Jan 31 at 14:06
  • Do you have the same issue if you try microdnf install dnf with root/sudo privelages? Commented Feb 4 at 18:19

1 Answer 1

1

From the SAM build images for Dotnet 8, I noticed that they use dnf to remove microdnf-dnf to then use microdnf to install dnf (It seems very weird, but I guess it works)

RUN dnf remove -y microdnf-dnf && \ microdnf install -y dnf 

I tried to install yum or Development Tools and it worked after doing that.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.