文档
注册

检查源

确认外网链接

安装过程需要下载相关依赖,请确保安装环境能够连接网络。执行如下命令测试是否连接外网。
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.

检查源(CentOS系统)

请在root用户下执行如下命令检查源是否可用。

yum makecache

如果执行上述命令提示“Your license is invalid”,请获取OS授权license。

如果命令执行报错或者后续安装依赖时等待时间过长甚至报错,则参考如下方式解决:

  • 回显“SSL certificate problem: self signed certificate in certificate chain”报错信息。
    1. 执行vi /etc/yum.conf命令,打开yum.conf文件,在文件最后一行后面添加如下内容。
      sslverify=false
    2. 执行:wq!命令保存文件并退出。
    3. 执行如下命令检查源。
      yum makecache
  • 检查网络是否连接或者把“/etc/yum.repos.d/CentOS-Base.repo”文件中的源更换为可用的源或使用镜像源。
  • 登录源链接,根据现场操作系统架构和版本,进入对应操作系统目录,单击打开“source.repo”文件,将文件内源链接复制到服务器“/etc/yum.repos.d/CentOS-Base.repo”文件中,再执行yum makecache命令。

检查源(KylinV10系统)

请在root用户下执行如下命令检查源是否可用。

yum makecache

如果命令执行报错或者后续安装依赖时等待时间过长甚至报错,则参考如下方式解决:

  • 检查网络是否连接或者把“/etc/yum.repos.d/kylin_aarch64.repo”文件中的源更换为可用的源或使用镜像源。
  • 用户也可以登录源链接,根据现场操作系统架构和版本,进入对应操作系统目录,单击打开“source.repo”文件,将文件内的[base]下的“baseurl”的源链接进行复制,替换服务器“/etc/yum.repos.d/kylin_aarch64.repo”文件中的“baseurl”的源链接。再执行yum makecache命令。

    源示例如下(xxx表示替换的源链接):

    [ks10-adv-os]
    name=Kylin Linux Advanced Server 10 - Os
    baseurl=xxx
    enabled=1
    gpgcheck=0

    若该软件源已失效,请用户寻找其它可用源进行配置。

检查源(openEuler系统)

请在root用户下执行如下命令检查源是否可用。

yum makecache

如果命令执行报错或者后续安装依赖时等待时间过长甚至报错,则参考如下方式解决:

  • 检查网络是否连接或者把“/etc/yum.repos.d/openEuler_aarch64.repo”文件中的源更换为可用的源或使用镜像源。
  • 用户也可以登录源链接,根据现场操作系统架构和版本,进入对应操作系统目录,单击打开“source.repo”文件,将文件内源链接复制到服务器“/etc/yum.repos.d/openEuler_aarch64.repo”文件中,再执行yum makecache命令。

    以openEuler20.03为例,源示例如下:

    [openEuler-os]
    name=openEuler-os
    baseurl=https://mirrors.huaweicloud.com/openeuler/openEuler-20.03-LTS/OS/aarch64/
    enabled=1
    gpgcheck=0
    gpgkey=https://mirrors.huaweicloud.com/openeuler/openEuler-20.03-LTS/OS/aarch64/RPM-GPG-KEY-openEuler

    若该软件源已失效,请用户寻找其它可用源进行配置。

检查源(Linx系统)

请在root用户下执行如下命令检查源是否可用。

apt-get update

如果命令执行报错或者后续安装依赖时等待时间过长甚至报错,则检查网络是否连接或者把“/etc/apt/sources.list”文件中的源更换为可用的源或使用镜像源。

配置网络软件源(请用户根据实际情况修改):

  1. 备份配置文件。
    cp /etc/apt/sources.list /etc/apt/sources.list_bak
  2. 执行vi /etc/apt/sources.list命令,将文件内容替换如下:
    deb http://mirrors.ustc.edu.cn/debian/ stretch main contrib non-free
    deb http://mirrors.ustc.edu.cn/debian/ stretch-backports main contrib non-free
    deb http://mirrors.ustc.edu.cn/debian/ stretch-proposed-updates main contrib non-free
    deb http://mirrors.ustc.edu.cn/debian/ stretch-updates main contrib non-free

    若该软件源已失效,请用户寻找其它可用源进行配置。

  3. 执行如下命令安装秘钥。
    apt-get install debian-keyring debian-archive-keyring
    apt-get update
搜索结果
找到“0”个结果

当前产品无相关内容

未找到相关内容,请尝试其他搜索词