Skip to content

Did you know?

Amazon Linux 2023 ships curl-minimal, so "dnf install curl" fails with a package conflict.

The curl command already works. If you need the full build, add --allowerasing to swap the packages.

  • Packages
  • Applies to Amazon Linux 2023, RHEL 9 and rebuilds
  • Last checked

Explained

To keep the base image small, Amazon Linux 2023 installs curl-minimal instead of the full curl package. It provides the same curl command and supports HTTP, HTTPS, FTP and FTPS, which covers install scripts, API calls and downloads. Many older guides still tell you to install curl first, but on Amazon Linux 2023 that step fails:

Error:
  - package curl-minimal-8.21.0-5.amzn2023.0.5.x86_64 from @System conflicts with curl provided by curl-7.87.0-2.amzn2023.0.2.x86_64 from amazonlinux

In most cases you can skip the step: curl is already there. Check with:

rpm -q curl-minimal

If a tool needs protocols that only the full build includes (such as SCP, SFTP, LDAP or TELNET), let dnf replace the minimal package:

sudo dnf install -y --allowerasing curl

The same applies to gnupg2-minimal, which Amazon Linux 2023 also installs in place of the full gnupg2 package.

RHEL 9, Rocky Linux 9 and AlmaLinux 9 ship curl-minimal too, so the same error and the same fix apply there. RHEL 10 and its rebuilds install the full curl package again.

Learn more

← All tech tips · Suggest a fix

Back to top