rocky-linux / sig-cloud-instance-images

47 stars 7 forks source link

Not able to install curl in image due to conflict with curl-minimal #41

Closed nqb closed 1 year ago

nqb commented 1 year ago

Hello,

If I try to install curl in rockylinux:9, I got following error:

[root@e583b02d693e /]# dnf install -y curl
Rocky Linux 9 - BaseOS                                                                                                                                                                                       1.0 MB/s | 1.7 MB     00:01
Rocky Linux 9 - AppStream                                                                                                                                                                                    3.6 MB/s | 6.4 MB     00:01
Rocky Linux 9 - Extras                                                                                                                                                                                       7.9 kB/s | 8.5 kB     00:01
Error:
 Problem: problem with installed package curl-minimal-7.76.1-19.el9.x86_64
  - package curl-minimal-7.76.1-19.el9.x86_64 conflicts with curl provided by curl-7.76.1-19.el9.x86_64
  - conflicting requests
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
brianclemens commented 1 year ago

The error text provides a solution. Use dnf install -y --allowerasing curl

nqb commented 1 year ago

Sounds like a workaround for me, not a long-term solution @brianclemens. But you are right, it will works.

NeilHanlon commented 1 year ago

Sounds like a workaround for me, not a long-term solution @brianclemens. But you are right, it will works.

You can also use dnf swap to perform the action.

curl minimal is standard now. if the full version is needed, it can be swapped for. otherwise, you can change your programs to require /usr/bin/curl instead of the curl package itself. curl minimal is fine in almost every case.