Centos8 搭建GB28181国标协议平台全流程
安装GIT
sudo dnf install git
或者
sudo yum install git
centos 8 安装git 可能碰到的报错
Errors during downloading metadata for repository 'appstream':
- Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=vag [Could not resolve host: mirrorlist.centos.org]
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=vag [Could not resolve host: mirrorlist.centos.org]
这个错误是因为CentOS 8的官方软件仓库已经停止维护,导致无法连接镜像服务器,解决办法:
- 备份原有配置
sudo cp -r /etc/yum.repos.d /etc/yum.repos.d.backup
- 下载新的repo文件
# 删除旧的repo文件
sudo rm -f /etc/yum.repos.d/*.repo
# 下载阿里云镜像源
sudo curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
# 或者使用清华镜像源
# sudo curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.tuna.tsinghua.edu.cn/repo/Centos-vault-8.5.2111.repo
- 清理缓存并重新构建
sudo yum clean all
sudo yum makecache

最低0.47元/天 解锁文章
1万+

被折叠的 条评论
为什么被折叠?



