I'm on a RHEL 8 system and by default sed 4.5 was installed.

[root@192 ~]# rpm -qf `which sed`
[root@192 ~]#

Since I want to use the --debug option to debug some sed commands, I have to upgrade sed. When I try to uninstall sed, I found a lot of other packages depend on it:

[root@192 ~]# rpm -e sed
error: Failed dependencies:
    /bin/sed is needed by (installed) os-prober-1.74-6.el8.x86_64
    sed is needed by (installed) krb5-libs-1.18.2-5.el8.x86_64
    sed is needed by (installed) ca-certificates-2020.2.41-80.0.el8_2.noarch
    sed is needed by (installed) dracut-049-95.git20200804.el8.x86_64
    sed is needed by (installed) policycoreutils-2.9-9.el8.x86_64
    sed is needed by (installed) sane-backends-1.0.27-19.el8_2.1.x86_64
    sed is needed by (installed) authselect-libs-1.2.1-2.el8.x86_64
    sed is needed by (installed) open-vm-tools-11.1.0-2.el8.x86_64
    sed is needed by (installed) dhcp-client-12:4.3.6-41.el8.x86_64
    sed is needed by (installed) cups-filters-1.20.0-20.el8.x86_64
    sed is needed by (installed) nfs-utils-1:2.3.3-35.el8.x86_64
    sed is needed by (installed) authselect-compat-1.2.1-2.el8.x86_64
    sed is needed by (installed) autofs-1:5.1.4-43.el8.x86_64
    /usr/bin/sed is needed by (installed) groff-base-1.22.3-18.el8.x86_64
[root@192 ~]#

In this case, what's the proper way to upgrade sed? I also tried to install a new version directly:

[root@192 ~]# rpm -ivh https://download-ib01.fedoraproject.org/pub/fedora/linux/releases/35/Everything/aarch64/os/Packages/s/sed-4.8-8.fc35.aarch64.rpm
Retrieving https://download-ib01.fedoraproject.org/pub/fedora/linux/releases/35/Everything/aarch64/os/Packages/s/sed-4.8-8.fc35.aarch64.rpm
warning: /var/tmp/rpm-tmp.VumGnB: Header V4 RSA/SHA256 Signature, key ID 9867c58f: NOKEY
error: Failed dependencies:
    glibc >= 2.33.9000-43.fc35 is needed by sed-4.8-8.fc35.aarch64
    ld-linux-aarch64.so.1()(64bit) is needed by sed-4.8-8.fc35.aarch64
    ld-linux-aarch64.so.1(GLIBC_2.17)(64bit) is needed by sed-4.8-8.fc35.aarch64
    libc.so.6(GLIBC_2.33)(64bit) is needed by sed-4.8-8.fc35.aarch64
    libc.so.6(GLIBC_2.34)(64bit) is needed by sed-4.8-8.fc35.aarch64
    libselinux.so.1(LIBSELINUX_1.0)(64bit) is needed by sed-4.8-8.fc35.aarch64
[root@192 ~]#

But, as you can see, it also has some failed dependencies. Should I install these missing dependencies and try to install again?


As jsbillings pointed out in the comment, I was using the wrong architecture of package. Below is the output of installing a x86_64 package.

[root@192 ~]# rpm -ivh https://download-ib01.fedoraproject.org/pub/fedora/linux/releases/35/Everything/x86_64/os/Packages/s/sed-4.8-8.fc35.x86_64.rpm
Retrieving https://download-ib01.fedoraproject.org/pub/fedora/linux/releases/35/Everything/x86_64/os/Packages/s/sed-4.8-8.fc35.x86_64.rpm
warning: /var/tmp/rpm-tmp.FT7OI2: Header V4 RSA/SHA256 Signature, key ID 9867c58f: NOKEY
error: Failed dependencies:
    glibc >= 2.33.9000-43.fc35 is needed by sed-4.8-8.fc35.x86_64
    libc.so.6(GLIBC_2.33)(64bit) is needed by sed-4.8-8.fc35.x86_64
    libc.so.6(GLIBC_2.34)(64bit) is needed by sed-4.8-8.fc35.x86_64
    libselinux.so.1(LIBSELINUX_1.0)(64bit) is needed by sed-4.8-8.fc35.x86_64
[root@192 ~]# 

  • 1
    You might get fewer dependency errors if you used an x86_64 package instead of the aarch64 package. Aarch64 packages are ARM and not Intel/AMD CPUs. ;)
    – jsbillings
    May 5 at 21:41
  • @jsbillings Thank you! I'll give it a try. May 5 at 21:42
  • It most likely won’t work, if the aarch64 package indicates it needs a newer glibc.
    – jsbillings
    May 5 at 21:42
  • 1
    Your best option would be to download the source rpm for a newer version of sed and build the package on your RHEL 8 system, so that it is linked with the version of glibc installed on YOUR system. This may require installing compilers and library headers if they're not already installed. BTW, there's a source rpm for sed 4.8.9 for Centos 9 at centos.pkgs.org/9-stream/centos-baseos-x86_64/… - this may require a little tweaking to build on RHEL 8, but at least the packaging work has been done.
    – cas
    May 6 at 2:13
  • 1
    If you can't build a package for some reason, your second best option is to download the unpackaged upstream sed source, compile it, and install it under /usr/local (adjust your PATH to add /usr/local/bin/ if it isn't already in PATH). Use GNU Stow or CheckInstall to enable you to easily upgrade or uninstall it in future. I don't know if either stow or checkinstall are packaged for RHEL but if they are, you should install the package.
    – cas
    May 6 at 2:18

1 Answer 1


You can’t install Fedora packages on RHEL.

Instead of trying to upgrade your sed, since you only want a newer version for its debugging capabilities, I recommend running a container:

sudo yum install podman
podman run -it --rm fedora:35

This will give you a Fedora container with a recent version of sed.

  • Thanks for the answer! This may be the most hassle-free way to solve my problem. May 5 at 21:51
  • Btw, do you mean it's technically not possible to install Fedora packages on RHEL or not suggested? I remember I have installed one called xclip with the command rpm -ivh https://download-ib01.fedoraproject.org/pub/epel/8/Everything/x86_64/Packages/x/xclip-0.13-8.el8.x86_64.rpm. May 5 at 21:53
  • 1
    EPEL packages are built to be installed on RHEL and clones. You are trying to install a Fedora 35 sed package, which was built for packages in Fedora 35, not RHEL8.
    – jsbillings
    May 5 at 21:55
  • 1
    If you are interested in Podman, I suggest investigating ‘toolbox’ (and ‘distrobox’) which integrates podman containers into a simple mechanism to use containers to run alternative runtime environments with your home directory.
    – jsbillings
    May 5 at 21:58
  • @jsbillings Thanks for the explanation and suggestion! May 5 at 21:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.