在 linux 系统上,解决软件包之间的依赖关系是很重要的事。很多工作无法实现可能就是因为缺少一个软件包,而当你千方百计找到这个软件包的时候,却发现它跟当前系统不兼容。所以,要做的非常重要的一件事情就是给系统添加软件仓库,以确保能安装使用大部分软件包。(亲测)建议看完文章再动手配置

实验环境:

[1-06@localhost Desktop]$ uname -a

Linux localhost 4.4.13-200.nd7.3.x86_64 #1 SMP Sat Jul 8 23:22:12 CST 2017 x86_64 x86_64 x86_64 GNU/Linux

中标麒麟软件下载命令为:yum  install

和fedora,Redhat,centos类似,相似于centos系统

中标麒麟-网易163 yum源配置

1.进入到/etc/yum/repos.d/目录中(该目录存放着yum软件仓库的配置文件)

[2-05@localhost yum.repos.d]$ cd /etc/yum.repos.d/

[2-05@localhost yum.repos.d]$ ls

neokylin.repo  neokylin-updates.repo

2.删除原有的yum源

[2-05@localhost yum.repos.d]$ rm -f *

3.使用vim编辑器创建一个新的配置文件(文件名称可随意,但后缀必须为.repo)

[2-05@localhost yum.repos.d]$ sudo vim mirrors.163.com.repo

配置参数:

[2-05@localhost yum.repos.d]$ cat mirrors.163.com.repo

[mirrors.163.com]

name=mirrors.163.com

baseurl=http://mirrors.163.com/centos/7/os/x86_64/

enabled=1

gpgcheck=0

4.检查配置是否正确

[2-05@localhost yum.repos.d]$ yum repolist

已加载插件:langpacks

mirrors.163.com | 3.6 kB 00:00:00

(1/2): mirrors.163.com/group_gz | 166 kB 00:00:00

(2/2): mirrors.163.com/primary_db | 6.0 MB 00:00:01

源标识 源名称 状态

mirrors.163.com mirrors.163.com 10,019

repolist: 10,019

5.更新Yum缓存

[root@localhost yum.repos.d]# yum list

[root@localhost yum.repos.d]# yum clean all

[root@localhost yum.repos.d]# yum makecache

中标麒麟-阿里云yum源配置

1.在线下载【需要连网】

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

2.Centos-7.repo文件中以$开始的变量进行替换

sed -i 's/$releasever/7/g' /etc/yum.repos.d/CentOS-Base.repo

3.更新yum缓存

清空缓存:yum clean all

生成缓存:yum makecache

中标麒麟-官方yum源配置

注意 :操作系统使用的源不同可能会对整个操作系统产生影响,用户想要使用中标麒麟官方源,可按照下面配置 /etc/yum.repo.d/ 中的源文件。在/etc/yum.repo.d/ 文件夹中有neokylin.repo和neokylin-updates.repo两个文件配置如下:

neokylin.repo

[root@localhost yum.repos.d]# cat neokylin.repo

[neokylin]

name= NeoKylin 7.0

baseurl=http://download.cs2c.com.cn/neokylin/desktop/releases/7.0/x86_64/zx/os/

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-neokylin-$basearch

[neokylin-32]

name= NeoKylin 7.0 32-bit

baseurl=http://download.cs2c.com.cn/neokylin/desktop/releases/7.0/i386/os/

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-neokylin-i386

neokylin-updates.repo

[root@localhost yum.repos.d]# cat neokylin-updates.repo

[neokylin-updates]

name= NeoKylin 7.0 Updates

baseurl=http://download.cs2c.com.cn/neokylin/desktop/updates/7.0/x86_64/zx/os/

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-neokylin-$basearch

[neokylin-updates-32]

name= NeoKylin 7.0 Updates 32-bit

baseurl=http://download.cs2c.com.cn/neokylin/desktop/updates/7.0/i386/os/

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-neokylin-i386

问题:本人设置的官方yum源中,包含32位和64位yum源配置,在使用的时候可以根据自己的需求对yum源进行配置。本人在使用yum源【官方yum源、163或centos源都会出现这种问题】安装软件的时候会出现很多软件包依赖问题,解决办法在下面文章中。【在下在网上查找一种方法,使用 NeoKylin-Live-Desktop-7.0-SDK-x86_64-B036-20160811.iso 镜像安装软件解决依赖包问题,目前还在测试中 】

---> Package xml-commons-resolver.noarch 0:1.2-17.nd7.1 will be installed

--> Finished Dependency Resolution

Error: Package: 1:cups-1.7.5-13.nd7.4.x86_64 (neokylin)

Requires: libdbus-1.so.3(LIBDBUS_1_3)(64bit)

Available: 1:dbus-libs-1.8.6-3.nd7.4.x86_64 (neokylin)

libdbus-1.so.3(LIBDBUS_1_3)(64bit)

Installed: 1:dbus-libs-1.8.20-1.nd7.1.x86_64 (@neokylin-updates-32/"7.0")

Not found

Available: 1:dbus-libs-1.8.6-3.nd7.1.i686 (neokylin-32)

Not found

Error: Package: filezilla-3.8.1-3.nd7.7.x86_64 (neokylin)

Requires: libdbus-1.so.3(LIBDBUS_1_3)(64bit)

Available: 1:dbus-libs-1.8.6-3.nd7.4.x86_64 (neokylin)

libdbus-1.so.3(LIBDBUS_1_3)(64bit)

Installed: 1:dbus-libs-1.8.20-1.nd7.1.x86_64 (@neokylin-updates-32/"7.0")

Not found

Available: 1:dbus-libs-1.8.6-3.nd7.1.i686 (neokylin-32)

Not found

Error: Package: caja-1.8.2-1.nd7.105.x86_64 (neokylin-updates)

Requires: libdbus-1.so.3(LIBDBUS_1_3)(64bit)

Available: 1:dbus-libs-1.8.6-3.nd7.4.x86_64 (neokylin)

libdbus-1.so.3(LIBDBUS_1_3)(64bit)

Installed: 1:dbus-libs-1.8.20-1.nd7.1.x86_64 (@neokylin-updates-32/"7.0")

Not found

Available: 1:dbus-libs-1.8.6-3.nd7.1.i686 (neokylin-32)

Not found

ps:本文章持续更新,致力于解决中标麒麟操作系统软件安装的各种问题,欢迎各路大神提出宝贵意见【仅安装问题】

2019-09-15【新增】

进过多次折腾终于可以实现yum update更新

1、实验环境:

[root@root01 ~]# cat /etc/issue

NeoKylin Linux Desktop release 7.0 (zhaoxin)

Kernel \r on an \m (\l)

[root@root01 ~]# uname -a

Linux root01 4.4.13-200.nd7.3.x86_64 #1 SMP Sat Jul 8 23:22:12 CST 2017 x86_64 x86_64 x86_64 GNU/Linux

[root@root01 ~]#

2、官方yum源:

[root@root01 ~]# cd /etc/yum.repos.d/

[root@root01 yum.repos.d]# ls

neokylin.repo neokylin-updates.repo

[root@root01 yum.repos.d]# cat neokylin*

[neokylin]

name= NeoKylin 7.0

baseurl=http://download.cs2c.com.cn/neokylin/desktop/releases/7.0/x86_64/zx/os/

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-neokylin-$basearch

[neokylin-updates]

name= NeoKylin 7.0 Updates

baseurl=http://download.cs2c.com.cn/neokylin/desktop/updates/7.0/x86_64/zx/os/

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-neokylin-$basearch

3、错误提示及解决:

[root@root01 yum.repos.d]# yum -y update --skip-broken

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

Resolving Dependencies

--> Running transaction check

---> Package PackageKit.x86_64 0:1.0.10-1.nd7.3 will be updated

。。。。。。

Error: Multilib version problems found. This often means that the root

cause is something else and multilib version checking is just

pointing out that there is a problem. Eg.:

1. You have an upgrade for gtk3 which is missing some

dependency that another package requires. Yum is trying to

solve this by installing an older version of gtk3 of the

different architecture. If you exclude the bad architecture

yum will tell you what the root cause is (which package

requires what). You can try redoing the upgrade with

--exclude gtk3.otherarch ... this should give you an error

message showing the root cause of the problem.

2. You have multiple architectures of gtk3 installed, but

yum can only see an upgrade for one of those architectures.

If you don't want/need both architectures anymore then you

can remove the one with the missing update and everything

will work.

3. You have duplicate versions of gtk3 installed already.

You can use "yum check" to get yum show these errors.

...you can also use --setopt=protected_multilib=false to remove

this checking, however this is almost never the correct thing to

do as something else is very likely to go wrong (often causing

much more problems).

Protected multilib versions: gtk3-3.22.10-5.nd7.1.x86_64 != gtk3-3.14.15-1.nd7.2.x86_64

[root@root01 yum.repos.d]# yum install gtk3

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

Resolving Dependencies

--> Running transaction check

---> Package gtk3.x86_64 0:3.14.15-1.nd7.2 will be updated

[root@root01 yum.repos.d]# yum -y update --skip-broken

。。。。。。成功执行update命令

Replaced:

PackageKit-cached-metadata.x86_64 0:1.0.10-1.nd7.3

libertas-usb8388-firmware.noarch 2:20150904-56.git6ebf5d57.nd7.1

xorg-x11-drv-modesetting.x86_64 0:0.9.0-2.nd7.1

Complete!

说明:在yum更新过程中总是出现一些安装包依赖问题不能解决,然后执行提示命令

{

You could try using --skip-broken to work around the problem

You could try running: rpm -Va --nofiles --nodigest

}

显示如上图gtk3所示,我把gtk3重新安装了一下,就解决了一些包的依赖问题,出现依赖问题的原因目前正在探索中,望各位高手指点迷津。

ps:今天在执行centos7的时候,yum update时也提示一些软件包依赖问题,错误提示如下:

Error: Package: nettle-3.2-2.el6.x86_64 (epel)

Requires: libgmp.so.3()(64bit)

Error: Package: gnutls-3.3.26-9.el7.x86_64 (base)

Requires: libnettle.so.4()(64bit)

Removing: nettle-2.7.1-4.el7.x86_64 (installed)

libnettle.so.4()(64bit)

Updated By: nettle-3.2-2.el6.x86_64 (epel)

~libnettle.so.6()(64bit)

Available: nettle-2.7.1-8.el7.x86_64 (base)

libnettle.so.4()(64bit)

Error: Package: gnutls-3.3.26-9.el7.x86_64 (base)

这是由于EPEL版本不对导致的,依次执行下面的命令就好了

yum remove epel-release

yum --enablerepo=extras install epel-release

yum clean all

关于yum、apt-get、rpm之类的软件管理工具,本人正在一步一步探索中希望以后能够将其原理解析一下,为国产软件以及开源事业尽绵薄之力 。

2020-06-29【新增】

中标麒麟操作系统发布的最新版本的操作系统,与上一版本相比linux内核降低了,yum工具使用起来比之前的版本好用一些,但官方软件源依然有待提高。

实验环境:

[neokylin@localhost Desktop]$ uname -a

Linux localhost.localdomain 3.10.0-862.9.1.nd7.zx.18.x86_64 #1 SMP Tue Nov 12 09:16:38 CST 2019 x86_64 x86_64 x86_64 GNU/Linux

1、中标麒麟官方源

因为没有用官方源,我把官方源放在新建的/etc/yum.repos.d/neokylin/文件夹下

2、中标麒麟第三方源配置

中标麒麟操作系统对标Fedora,Fedora和centos、redhat是直系关系,故centos能用的官方及第三方源理论上中标麒麟都能用,但是还是再次提醒,第三方源慎用,使用非官方提供的软件及依赖造成系统奔溃是常事。

Centos源配置

参见上文:中标麒麟-阿里云yum源配置;中标麒麟-网易163 yum源配置

ElRepo 源配置

ElRepo 是国外的一个只对Linux操作系统的第三方免费软件资源库,支持Linux和CentOS操作系统的软件安装和升级,国内可用,以下配置只针对以上实验环境。

1、导入key

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

2、安装ElRepo

命令安装总是出现问题,下面是安装:

yum install https://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm

如果上面yum成功可以忽略下面建议。

建议:直接创建elrepo.repo文件,把下面 ### 开始的内容拷贝到该文件中,更新即可:

[neokylin@localhost yum.repos.d]$ cat elrepo.repo

### Name: ELRepo.org Community Enterprise Linux Repository for el7

### URL: http://elrepo.org/

[elrepo]

name=ELRepo.org Community Enterprise Linux Repository - el7

baseurl=http://elrepo.org/linux/elrepo/el7/$basearch/

http://mirrors.coreix.net/elrepo/elrepo/el7/$basearch/

http://mirror.rackspace.com/elrepo/elrepo/el7/$basearch/

http://repos.lax-noc.com/elrepo/elrepo/el7/$basearch/

http://mirror.ventraip.net.au/elrepo/elrepo/el7/$basearch/

mirrorlist=http://mirrors.elrepo.org/mirrors-elrepo.el7

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org

protect=0

[elrepo-testing]

name=ELRepo.org Community Enterprise Linux Testing Repository - el7

baseurl=http://elrepo.org/linux/testing/el7/$basearch/

http://mirrors.coreix.net/elrepo/testing/el7/$basearch/

http://mirror.rackspace.com/elrepo/testing/el7/$basearch/

http://repos.lax-noc.com/elrepo/testing/el7/$basearch/

http://mirror.ventraip.net.au/elrepo/testing/el7/$basearch/

mirrorlist=http://mirrors.elrepo.org/mirrors-elrepo-testing.el7

enabled=0

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org

protect=0

[elrepo-kernel]

name=ELRepo.org Community Enterprise Linux Kernel Repository - el7

baseurl=http://elrepo.org/linux/kernel/el7/$basearch/

http://mirrors.coreix.net/elrepo/kernel/el7/$basearch/

http://mirror.rackspace.com/elrepo/kernel/el7/$basearch/

http://repos.lax-noc.com/elrepo/kernel/el7/$basearch/

http://mirror.ventraip.net.au/elrepo/kernel/el7/$basearch/

mirrorlist=http://mirrors.elrepo.org/mirrors-elrepo-kernel.el7

enabled=0

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org

protect=0

[elrepo-extras]

name=ELRepo.org Community Enterprise Linux Extras Repository - el7

baseurl=http://elrepo.org/linux/extras/el7/$basearch/

http://mirrors.coreix.net/elrepo/extras/el7/$basearch/

http://mirror.rackspace.com/elrepo/extras/el7/$basearch/

http://repos.lax-noc.com/elrepo/extras/el7/$basearch/

http://mirror.ventraip.net.au/elrepo/extras/el7/$basearch/

mirrorlist=http://mirrors.elrepo.org/mirrors-elrepo-extras.el7

enabled=0

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org

protect=0

Epel源配置

EPEL (Extra Packages for Enterprise Linux), 是由 Fedora Special Interest Group 维护的 Enterprise Linux(RHEL、CentOS)中经常用到的包。

1、下载新repo 到/etc/yum.repos.d/

wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

中标麒麟使用centos源_中标麒麟操作系统yum源配置相关推荐

  1. CentOS 如何搭建本地和局域网yum源

    CentOS(Community Enterprise Operating System,中文意思是社区企业操作系统)是Linux发行版之一,它是来自于Red Hat Enterprise Linux ...

  2. Centos操作系统yum源的使用

    Yum是Centos操作系统中的一个重要工具,它可以帮助用户方便地管理软件安装和更新,而yum源则是提供这些软件的资源库.本文将介绍Centos操作系统中如何使用yum源. 一.查看已有yum源 在C ...

  3. dashboard 镜像源_使用国内docker镜像源

    在国内,通过Docker的pull和push命令访问hub.docker时,网络十分慢,而且会出现各种各样的网络连接问题.因此这里介绍下如何使用国内的镜像源,这里以DaoCloud为例. 注册完成后, ...

  4. centos、linux离线搭建yum源,iso文件制作yum源,nginx搭建yum源

    centos离线搭建yum源 一.yum源简介及搭建流程 1.什么情况需要搭建yum源 2.搭建yum源流程 3.指向yum源原理 二.centos搭建离线epel源 1.下载epel源,制成iso镜 ...

  5. php5 mysql 源_CentOS 7.4使用yum源安装MySQL5.7

    从CentOS 7.0发布以来,yum源中开始使用Mariadb来代替MySQL的安装.即使你输入的是yum install -y mysql , 显示的也是Mariadb的安装内容.使用源代码进行编 ...

  6. 网易(163)yum源是国内最好的yum源

    网易(163)yum源是国内最好的yum源之一 ,无论是速度还是软件版本,都非常的不错,将yum源设置为163yum,可以提升软件包安装和更新的速度,同时避免一些常见软件版本无法找到.具体设置方法如下 ...

  7. 【yum参数】【yum指令】【更换阿里源163源】【更换本地yum源】

    [1]yum分类:以及配置文件位置 [2]yum操作指令 [3]更换ali源 163源 [4]本地源制作yum源 ​      **yum****操作** 参数以及指令 [1]yum分类:以及配置文件 ...

  8. yum源简单介绍及本地yum源的搭建

    一.yum是一个工具,可以用来查询.安装.升级.卸载软件       YUM(Yellow dog Updater,Modified)       etc/yum.repos.d/( reposito ...

  9. gpg 中标麒麟获取 密钥失败_中标麒麟下软件源配置

    中标麒麟7.0默认软件源配置是错误的,所以我们需要进行修改.流程如下: 1.进入源路径 : cd /etc/yum.repos.d/ 2.删除所有原有源 : sudo rm -f * 3.查看当前路径 ...

  10. 中标麒麟linux系统安装打印机_中标软件+天津麒麟=中国国产操作系统新旗舰

    12月6日,中国电子旗下中国软件在京召开新闻发布会,宣布中国软件旗下中标软件和天津麒麟两家操作系统公司正式整合,设立新的操作系统公司,合力打造操作系统"国家队". "冰火 ...

最新文章

  1. 如何在Ubuntu/CentOS上安装Linux内核4.0
  2. 修改MySql默认存储引擎为InnoDB,启动报错
  3. android代码里 写线程,在Android线程池里运行代码任务实例
  4. mysql将字符串字段转为数字排序或比大小
  5. opencv摄像头用法
  6. HibernateTemplate 的常见用法
  7. inet_aton和inet_network和inet_addr三者比较-《别怕Linux编程》之五
  8. 使用JJWT实现JWT代码示例
  9. CentOS6.7安装scala2.11.7
  10. 张雪峰计算机科学与技术学什么,张雪峰看好的三大专业是什么 前景好的专业...
  11. leetcode 17. 电话号码的字母组合 思考分析
  12. c# 字节十六进制转十进制_用C中的十进制,八进制和十六进制数字初始化字节数组...
  13. CentOS配置DHCP服务器
  14. Android 的蓝牙简介
  15. 1的阶乘加到20的阶乘
  16. Java word转pdf字体格式和样式变乱的问题
  17. 项目UML设计(团队)
  18. 18款口碑爆棚手机浏览器,被一网打尽了
  19. LSI阵列卡的使用教程
  20. AR涂涂乐⭐六、 UGUI精灵格式、自动延迟截图、优化“4”、移出扫描框终止截图进程

热门文章

  1. 真好玩python教孩子学编程_Python真好玩:教孩子学编程(全彩印刷))简介,目录书摘...
  2. 陀螺研究院 | 产业区块链发展周报(11.7—11.13)
  3. idea+java+mysql+SQLyog安装教程
  4. ssh远程连接阿里云服务器
  5. 直流双闭环pwm调速系统matlab仿真,基于Matlab的双闭环PWM直流调速虚拟实验系统
  6. 计算机地图概括的原理,第五章地图概括与自动综合
  7. lingo等相关参数
  8. msfvenom 生成php木马,利用msfvenom生成木马程序
  9. 低压电力线载波通信原理
  10. 基于微信小程序的疫情防控平台设计与实现-计算机毕业设计源码+LW文档