检查源
确认外网链接
安装过程需要下载相关依赖,请确保安装环境能够连接网络。执行如下命令测试是否连接外网。
wget www.hiascend.com
如果能下载到网页html文件,类似以下回显,则表明服务器已成功连接外网。
检查源(Ubuntu系统)
请在root用户下执行如下命令检查源是否可用。
apt-get update
如果命令执行报错或者后续安装依赖时等待时间过长甚至报错,则参考如下方式解决:
- 检查网络是否连接或者把“/etc/apt/sources.list”文件中的源更换为可用的源或使用镜像源。
- 登录源链接,根据现场操作系统架构和版本,进入对应操作系统目录,单击打开“source.list”文件,将文件内源链接复制到服务器“/etc/apt/sources.list”文件中,再执行apt-get update命令。
- 如果执行apt-get update命令时,出现类似如下所示报错,则执行apt-get update --allow-unauthenticated命令。
Err:1 https://repo.huaweicloud.com/docker-ce/linux/ubuntu focal InRelease Temporary failure resolving 'repo.huaweicloud.com' Err:2 https://mirrors.huaweicloud.com/ubuntu-ports focal InRelease Temporary failure resolving 'mirrors.huaweicloud.com' Err:3 https://mirrors.huaweicloud.com/ubuntu-ports focal-updates InRelease Temporary failure resolving 'mirrors.huaweicloud.com' Err:4 https://mirrors.huaweicloud.com/ubuntu-ports focal-security InRelease Temporary failure resolving 'mirrors.huaweicloud.com' Err:5 https://mirrors.huaweicloud.com/docker-ce/linux/ubuntu focal InRelease Temporary failure resolving 'mirrors.huaweicloud.com' Reading package lists... Done N: Ignoring file 'index.html' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension W: Failed to fetch https://mirrors.huaweicloud.com/ubuntu-ports/dists/focal/InRelease Temporary failure resolving 'mirrors.huaweicloud.com' W: Failed to fetch https://mirrors.huaweicloud.com/ubuntu-ports/dists/focal-updates/InRelease Temporary failure resolving 'mirrors.huaweicloud.com' W: Failed to fetch https://mirrors.huaweicloud.com/ubuntu-ports/dists/focal-security/InRelease Temporary failure resolving 'mirrors.huaweicloud.com' W: Failed to fetch https://mirrors.huaweicloud.com/docker-ce/linux/ubuntu/dists/focal/InRelease Temporary failure resolving 'mirrors.huaweicloud.com' W: Failed to fetch https://repo.huaweicloud.com/docker-ce/linux/ubuntu/dists/focal/InRelease Temporary failure resolving 'repo.huaweicloud.com' W: Some index files failed to download. They have been ignored, or old ones used instead.
父主题: 安装依赖