中标麒麟配置本地yum源_优麒麟系统安装

中标麒麟配置本地yum源_优麒麟系统安装在linux系统上,解决软件包之间的依赖关系是很重要的事。很多工作无法实现可能就是因为缺少一个软件包,而当你千方百计找到这个软件包的时候,却发现它跟当前系统不兼容。所以,要做的非常重要的一件事情就是给系统添加软件仓库,以确保能安装使用大部分软件包。(亲测)建议看完文章再动手配置实验环境:[1-06@localhostDesktop]$uname-aLinuxlocalh…

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

在 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

中标麒麟配置本地yum源_优麒麟系统安装

1、中标麒麟官方源

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

中标麒麟配置本地yum源_优麒麟系统安装

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

中标麒麟配置本地yum源_优麒麟系统安装

中标麒麟操作系统对标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

2021-09-22

由于本人时间精力有限,不能回复每条评论,所以对评论区问题进行总结回答:

1、关于CPU

        CPU是区分架构和指令集的,为实现更高的效率CPU也一直在更新(位数、核数、集成GPU等功能)。不同架构的CPU适应不同的生成环境,使用的指令集也不尽相同但可能会有指令集的兼容性。

2、操作系统

        操作系统内核也是区分体系结构的

        中标麒麟配置本地yum源_优麒麟系统安装

        以上图centos8操作系统为例,其同一个发行版本提供不同体系结构的操作系统镜像,不同体系结构的操作系统镜像适配相对应的CPU。如果x86_64的操作系统镜像安装在i386的CPU上会发生什么问题呢?会出现兼容性问题,导致安装失败

3、应用层软件(主要想说明的问题)

        操作系统内核肯定是区分体系结构的,如x86_64、ppc64、aarch64、s390x等,不同的体系结构肯定是要编译出针对性的内核来运行(兼容的除外)。上层软件分为体系结构相关和不相关,体系结构相关的也要分不同体系结构分开编译(同上),体系结构不相关的如一些文档或者如python等高级语言写的简单软件则可以一次编译处处运行。32位处理器能装64位系统吗?是否有处理器有x86和x64两种版本? – 知乎

rpm软件包的文件名中,不仅包含了软件名称,版本信息,还包括了适用的硬件架构的信息。
i386指这个软件包适用于intel 80386以上的x86架构的计算机(AI32)i686指这个软件包适用于intel 80686以上(奔腾pro以上)的x86架构的计算机(IA32)
noarch指这个软件包与硬件架构无关,可以通用。
i686软件包通常针对CPU进行了优化,现在通常配置的机器都可以使用i686软件包。

        对于已经编译成二进制的rpm包,由于操作系统环境不同,一般不能混用。对于以src.rpm发行的软件包,由于需要安装时进行本地编译,所以通常可以在不同系统下安装。

RPM包管理及硬件架构问题_郑陆伟先生_新浪博客

        本文使用的实验环境是x86_64体系结构的NeoKylin操作系统【该系统镜像我也没有,大家可以自行与NeoKylin联系申请使用】。

NeoKylin桌面版官方源:

        Index of /neokylin/desktop/releases/7.0

中标麒麟配置本地yum源_优麒麟系统安装

        在配置第三方源的时候注意操作系统的体系结构,选择与之相对应的软件包或noarch软件包。

        以后有时间会对CPU、操作系统、应用层软件的体系结构进行详细介绍,欢迎补充!!!!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/169476.html原文链接:https://javaforall.net

(0)
上一篇 2022年8月10日 上午6:46
下一篇 2022年8月10日 上午6:46


相关推荐

  • 腾讯浑元模型左边搜索记录怎么删除

    腾讯浑元模型左边搜索记录怎么删除

    2026年3月13日
    2
  • apache 负载均衡_apache部署

    apache 负载均衡_apache部署[1]Apache负载均衡设置方法mod_proxy使用介绍一般来说,负载均衡就是将客户端的请求分流给后端的各个真实服务器,达到负载均衡的目的。还有一种方式是用两台服务器,一台作为主服务器(Master),另一台作为热备份(HotStandby),请求全部分给主服务器,在主服务器当机时,立即切换到备份服务器,以提高系统的整体可 第一次看到这个标题时我也很惊讶,Apache居然还能做负载

    2025年10月13日
    6
  • Python字符串使用详解

    Python字符串使用详解除了数字,Python中最常见的数据类型就是字符串,无论那种编程语言,字符串无处不在。例如,从用户哪里读取字符串,并将字符串打印到屏幕显示出来。字符串是一种数据结构,这让我们有机会学习索引和切片——用于从字符串中提取子串的方法。1字符串索引在Python语法支持中,我们简单的阐述过字符串的使用,现在我们看看python程序在处理字符串时,如何对其进行索引,打印出其中的每个字符串。我们输入一个字符串:’你好,Lucky’,Python使用方括号[]来对字符串进行索引,方括号内的数字0~n表

    2025年7月29日
    5
  • javascript refresh page 几种页面刷新的方法[通俗易懂]

    javascript refresh page 几种页面刷新的方法[通俗易懂]javascriptrefreshpage几种页面刷新的方法下面以三个页面分别命名为frame.html、top.html、bottom.html为例来具体说明如何做。frame.html由上(top.html)下(bottom.html)两个页面组成,代码如下:复制代码 代码如下:  frame       

    2022年7月18日
    21
  • 微信小程序支付功能实现全过程简析

    微信小程序支付功能实现全过程简析今天小编带大家来分析一下微信小程序支付功能的实现全过程 先附一张小程序支付时序图 整体流程 在所以操作之前 我们得先有微信开发者账号 还得有自己的商户号和商品密匙 微信端请求下单之后 会调用 wx request 接口发起网络请求 服务器接收到请求之后会调用 auth code2Session 接口 换取用户唯一标识 OpenID 和会话密钥 session key 服务器端收到 openid 之后会再去调用支付统一下单接口 具体内容下文会说 返回一些数据 其中最重要的就是 prepay id 服

    2026年3月19日
    3
  • win10中安装centos7双系统

    win10中安装centos7双系统不能识别ntfs盘怎么处理。./configuremakemakeinstall用fdisk-l查看下分区表里ntfs盘都是什么盘。为这里在win10下的ntfs盘分别为sda1、sda2、sda3、sda5、sda6添加挂载在计算机下mnt文件下中新建几个文件夹分别用来挂在你的ntfs硬盘。这里我在mnt文件夹下新建了study、work、funmoun…

    2022年7月24日
    19

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号