文档
注册

检查源

确认外网链接

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

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

检查源(CUlinux 3.0系统)

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

yum makecache

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

  • 回显“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/culinux.repo”文件中的源更换为可用的源或使用镜像源。

检查源(CTyunOS 22.06)

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

yum makecache

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

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

检查源(BC Linux系统)

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

yum makecache

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

如果仅用于测试和验证,可执行以下操作步骤忽略license许可证校验:

  1. 执行rpm -qa | grep license命令查询license软件包(以下回显仅为示例,请以实际情况为准)。
    bind-license-9.11.4-9.P2.el7.noarch 
    bclinux-license-manager-3.0-1.el7.bclinux.aarch64 
    tigervnc-license-1.8.0-17.el7.noarch
  2. 执行rpm -e --nodeps bclinux-license-manager-3.0-1.el7.bclinux.aarch64 --noscripts命令将bclinux-license软件包卸载。

建议用户登录源链接,将文件内全部内容复制到服务器“/etc/yum.repos.d/BCLinux-Base.repo”文件中,再执行yum makecache命令。

如果命令执行返回以下报错信息:

You have enabled checking of packages via GPG keys. This is a good thing.
However, you do not have any GPG public keys installed. You need to download
the keys for packages you wish to install and install them
You can do that by running the command:
    rpm --import public.gpg.key

则执行find / -name RPM-GPG-KEY*命令查询GPG秘钥所在路径(以下回显仅为示例,请以实际情况为准)。

/etc/pki/rpm-gpg/RPM-GPG-KEY-BCLinux-7
/etc/pki/rpm-gpg/RPM-GPG-KEY-BCLinux-Testing-7
/etc/pki/rpm-gpg/RPM-GPG-KEY-BCLinux-Debug-7

进入GPG秘钥所在路径。

cd /etc/pki/rpm-gpg

执行如下命令安装GPG秘钥。

rpm --import RPM-GPG-KEY-BCLinux-7
rpm --import RPM-GPG-KEY-BCLinux-Debug-7
rpm --import RPM-GPG-KEY-BCLinux-Testing-7

执行yum makecache命令。

搜索结果
找到“0”个结果

当前产品无相关内容

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