Enabling EPEL and EPEL Next Repositories in AlmaLinux 9 or Rocky Linux 9

7 Min Read

Enabling EPEL and EPEL Next in AlmaLinux 9 or Rocky Linux 9

When setting up a new server with AlmaLinux 9 or Rocky Linux 9, you may need to enable the EPEL (Extra Packages for Enterprise Linux) repository to access additional packages that are not included in the base distribution. EPEL Next is the next generation of the EPEL repository, providing additional packages and updates.

Enabling EPEL Repository

To enable the EPEL repository in AlmaLinux 9 or Rocky Linux 9, you can use the following steps:

  1. Start by installing the epel-release package, which will enable the EPEL repository on your system. You can do this by running the following command in your terminal:
sudo dnf install epel-release
  1. After the installation is complete, the EPEL repository will be enabled on your system, and you will be able to install additional packages from it using the dnf package manager.

Enabling EPEL Next Repository

If you also want to enable the EPEL Next repository for additional packages and updates, you can follow these steps:

  1. First, you will need to install the epel-release package from the EPEL repository, as mentioned in the previous section.
  2. Next, you can enable the EPEL Next repository by installing the epel-release-next package. Run the following command in your terminal to do so:
  3. Once the installation is complete, the EPEL Next repository will be enabled on your system, allowing you to access additional packages and updates that are not available in the standard EPEL repository.

After enabling the EPEL and EPEL Next repositories, you can use the dnf package manager to search for and install the packages you need for your system. Keep in mind that while these additional repositories provide access to a wide range of packages, it’s important to exercise caution and only install packages from trusted sources to ensure the security and stability of your system.

By following these steps, you can easily enable the EPEL and EPEL Next repositories in AlmaLinux 9 or Rocky Linux 9, expanding the range of available packages and updates for your server.

Enabling EPEL Next Repository

EPEL Next is the next generation of the EPEL repository, providing additional packages and updates. To enable the EPEL Next repository in AlmaLinux 9 or Rocky Linux 9, follow these steps:

  1. First, you need to install the EPEL Next repository package. You can do this by running the following command in your terminal.
sudo dnf install epel-next-release
  1. After the installation is complete, the EPEL Next repository will be enabled on your system, and you will be able to install additional packages from it using the dnf package manager.

Verifying Enabled Repositories

To verify that the EPEL and EPEL Next repositories have been successfully enabled, you can use the following command:

sudo dnf repolist

This will display a list of all the enabled repositories on your system, including the EPEL and EPEL Next repositories if they have been successfully enabled.

Installing Packages from EPEL and EPEL Next

Once the EPEL and EPEL Next repositories are enabled, you can install packages from them using the dnf package manager. For example, to install the htop package from the EPEL repository, you can run the following command:

sudo dnf install htop

Similarly, to install a package from the EPEL Next repository, you can use the following command:

sudo dnf install --enablerepo=epel-next package-name

Replace package-name with the name of the package you want to install.

Updating Packages from EPEL and EPEL Next

To update packages from the EPEL and EPEL Next repositories, you can use the following command:

sudo dnf update

This will update all installed packages on your system, including those from the EPEL and EPEL Next repositories.

Disabling EPEL and EPEL Next Repositories

If you no longer need to use the EPEL or EPEL Next repositories, you can disable them by removing the corresponding repository configuration files. To do this, follow these steps:

  1. For the EPEL repository, remove the epel-release package:
sudo dnf remove epel-release
  1. For the EPEL Next repository, remove the epel-next-release package:
sudo dnf remove epel-next-release

After removing the packages, the EPEL and EPEL Next repositories will be disabled, and you will no longer be able to install or update packages from them.

Troubleshooting

If you encounter any issues while enabling or using the EPEL or EPEL Next repositories, you can try the following troubleshooting steps:

  1. Check the repository configuration files: The repository configuration files are located in the /etc/yum.repos.d/ directory. Ensure that the EPEL and EPEL Next repository files are present and configured correctly.
  2. Refresh the package metadata: Run the following command to refresh the package metadata:
sudo dnf makecache
  1. Check for package conflicts: If you encounter any issues installing packages from the EPEL or EPEL Next repositories, there might be a conflict with packages from the base distribution. You can try to resolve the conflict by using the --allowerasing or --nobest options with the dnf command.

Conclusion

Enabling the EPEL and EPEL Next repositories in AlmaLinux 9 or Rocky Linux 9 is a straightforward process that can provide you with access to a wider range of packages and updates. By following the steps outlined in this guide, you can easily enable and use these repositories to enhance the functionality of your system. Remember to keep an eye out for any issues or conflicts and use the troubleshooting steps provided to resolve them.

Leave a comment