银河麒麟之添加阿里云apt镜像源

您所在的位置:网站首页 银河麒麟网络配置文件 银河麒麟之添加阿里云apt镜像源

银河麒麟之添加阿里云apt镜像源

2024-04-08 05:33| 来源: 网络整理| 查看: 265

一、apt介绍

  apt-get,是一条linux命令,适用于deb包管理式的操作系统,主要用于自动从互联网的软件仓库中搜索、安装、升级、卸载软件或操作系统。Advanced Package Tool,又名apt-get,是一款适用于Unix和Linux系统的应用程序管理器。最初于1998年发布,用于检索应用程序并将其加载到Debian Linux系统。Apt-get成名的原因之一在于其出色的解决软件依赖关系的能力。其通常使用.deb-formatted文件,但经过修改后可以使用apt-rpm处理红帽的Package Manager(RPM)文件。 apt-get命令一般需要root权限执行,所以一般跟着sudo命令。 例:sudo apt-get xxxx

二、操作步骤 1、备份原sources.list文件

root@kylinvm:/usr/local# cd /etc/apt/ root@kylinvm:/etc/apt# cp sources.list sources.list.bak

2、修改sources.list文件添加阿里云apt源

deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse

root@kylinvm:/etc/apt# cat sources.list deb http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1 main restricted universe multiverse deb http://archive.kylinos.cn/kylin/partner 10.1 main deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse # This system was installed using small removable media # (e.g. netinst, live or single CD). The matching “deb cdrom” # entries were disabled at the end of the installation process. # For information about how to configure apt package sources, # see the sources.list(5) manual.

3、更新源

root@kylinvm:/etc/apt# apt update 命中:1 http://mirrors.aliyun.com/ubuntu focal InRelease 命中:2 http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1 InRelease 命中:3 http://archive.kylinos.cn/kylin/partner 10.1 InRelease 正在读取软件包列表… 完成 正在分析软件包的依赖关系树 正在读取状态信息… 完成 有 364 个软件包可以升级。请执行 ‘apt list --upgradable’ 来查看它们。

三、FAQ

  银河麒麟操作系统因为做了部分国产化操作,建议将阿里云上的Ubuntu apt源作为补充。只使用阿里云apt源情况下,底层依赖包可能会安装出差,如截图。 在这里插入图片描述



【本文地址】


今日新闻


推荐新闻


    CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3