If you are encountering an issue where the yum command hangs on the message “Running transaction test,” it could be due to a variety of reasons, including network connectivity issues, a misconfigured repository, or a corrupted package database.
Here are a few solutions you can try:
- Check network connectivity: Make sure that you have a stable network connection. You can check your network connectivity by pinging a few websites or the default gateway.
- Disable plugins: Yum plugins can cause problems and cause the
yumcommand to hang. Try disabling all plugins by adding the following line to your/etc/yum.conffile:
plugins=0
- Clean Yum cache: Cleaning the Yum cache can help resolve problems with the
yumcommand. To clean the Yum cache, use the following command:
yum clean all
- Remove repository: If a specific repository is causing the issue, you can remove it by using the following command:
yum remove <repo-name>
- Reinstall yum: If the problem persists, you can try reinstalling the
yumpackage by using the following command:
yum reinstall yum
If none of these solutions work, you can try using the --skip-broken option with the yum command. This option allows yum to continue installing packages even if a package is broken or cannot be installed.
yum --skip-broken update
If the problem still persists, you may need to look at the logs in the /var/log/yum.log file to see if there are any specific error messages that can help identify the root cause of the issue.