How to fix the “Failed to synchronize cache for repo appstream” error? At Bobcares, with our Server Management Services, we can handle your server-related issues.
How to fix the “Failed to synchronize cache for repo appstream” error?
AppStream repository’s content includes more user space programs, runtime languages, and databases to accommodate the range of workloads and use cases. Also, application Streams are specific user space components from the AppStream repository. The distribution is diverse because Application Streams are released on a cadence that is appropriate for each package. The way that many versions of a single package accessible for installation under RHEL 8 improves with the Application Streams.
Moreover, RHEL 8 unifies the previous channels of distribution into one location. Application Streams are offered in the well-known RPM format, as a module-based RPM extension, or as Software Collections. While upgrading CentOS 7 to CentOS 8, we may sometimes see the following error: Failed to synchronize cache for repo ‘appstream’. The error will be like this:
The /var/log/dnf.log
output showing additional DEBUG information
When we see the message, we may think the error is caused by poor network connectivity. But that may not be the case always. There will be a number of causes for this problem. The most typical examples are:
1. incorrectly set time and date.
2. CentOS baseURL.
3. Old dnf cache available or expired.
Solution 1
In CentOS 7 and 8, the timedatectlcommand
is a brand-new utility tool. It serves as a replacement for the outdated date command used by Linux distributions with sysvinit
daemons. Find the system’s current date and time. Make sure the time zone is set correctly.
Now set it to our timezone:
Solution 2
In order to clean Old/expired dnf cache, use the command:
Solution 3
In order to change CentOS baseURL, follow the below steps:
1. Navigate to the /etc/yum.repos.d/ directory.
2. Execute the commands:
3. Finally, run dnf update.
[Looking for a solution to another query? We are just a click away.]
Conclusion
The article explains about the error, “Failed to synchronize cache for repo appstream”, along with its causes and the solutions associated with each cause.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
0 Comments