I got issue in centos
Error: Failed to download metadata for repo ‘AppStream’: Cannot prepare internal mirrorlist |Centos
try below steps:
Please mentions your issue messages and solution too
my Solution to this issue is
Solution.1
Go to /etc/yum.repos.d/
cd /etc/yum.repos.d/
Run
sudo sed -i ‘s/mirrorlist/#mirrorlist/g’ /etc/yum.repos.d/CentOS-*
sudo sed -i ‘s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g’ /etc/yum.repos.d/CentOS-*
sudo yum update -y
i was still getting error below
CentOS Linux 8 – AppStream 111 B/s | 38 B 00:00
Error: Failed to download metadata for repo ‘appstream’: Cannot prepare internal mirrorlist: No URLs in mirrorlist
Solution worked.
2
Answers
I send the commands and now it is working:
Thanks so much.
[root@ip-172-31-39-44 yum.repos.d]# sed -i ‘s/mirrorlist/#mirrorlist/g’ /etc/yum.repos.d/CentOS-*
sed: can’t read /etc/yum.repos.d/CentOS-*: No such file or directory
i got this error when i apply abouve links on my ec2 server