docker安装centos解决Failed to set locale, defaulting to C.UTF-8

1.解决centos报错Failed to set locale, defaulting to C.UTF-8问题

1.在容器中执行以下命令

echo "export LC_ALL=en_US.UTF-8"  >>  /etc/profile
echo "export LC_CTYPE=en_US.UTF-8"  >>  /etc/profile
source /etc/profile

2.解决centos报错Error: Failed to download metadata for repo ‘appstream’: Cannot prepare internal mirrorlist问题

cd /etc/yum.repos.d/
 
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
 
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
 
yum update -y
sanradar
sanradar
文章: 104

6 评论

  1. You really make it seem so easy with your presentation however I find this topic to be really one thing
    which I believe I’d by no means understand. It kind of feels too complicated and
    extremely extensive for me. I’m looking ahead for your next submit, I’ll attempt
    to get the dangle of it! Escape room

留下评论

您的电子邮箱地址不会被公开。 必填项已用 * 标注