中标麒麟操作系统yum源配置
<p>关闭防火墙</p><p>步骤1停止防火墙。# systemctl stop firewalld.service</p>
<p>步骤2关闭防火墙。# systemctl disable firewalld.service</p>
<p>修改SELINUX为disabled</p>
<p>步骤1关闭防火墙。</p>
<p># sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux</p>
<h1 id="articleContentId" class="title-article">中标麒麟操作系统yum源配置</h1>
<p>在 linux 系统上,解决软件包之间的依赖关系是很重要的事。很多工作无法实现可能就是因为缺少一个软件包,而当你千方百计找到这个软件包的时候,却发现它跟当前系统不兼容。所以,要做的非常重要的一件事情就是给系统添加软件仓库,以确保能安装使用大部分软件包。(亲测)建议看完文章再动手配置</p>
<p>实验环境:</p>
<pre data-index="0"><code class="hljs language-crystal">[<span class="hljs-number">1-<span class="hljs-number">06<span class="hljs-variable">@localhost Desktop]<span class="hljs-variable">$ uname -aLinux localhost <span class="hljs-number">4.4.<span class="hljs-number">13-<span class="hljs-number">200.nd7.<span class="hljs-number">3.x86_64 <span class="hljs-comment">#1 SMP Sat Jul 8 23:22:12 CST 2017 x86_64 x86_64 x86_64 GNU/Linux
</span></span></span></span></span></span></span></span></span></code></pre>
<p>中标麒麟软件下载命令为:yum install</p>
<p>和fedora,Redhat,centos类似,相似于centos系统</p>
<h1 id="163yum">中标麒麟-网易163 yum源配置</h1>
<p>1.进入到/etc/yum/repos.d/目录中(该目录存放着yum软件仓库的配置文件)</p>
<div class="cnblogs_code">
<pre>$ cd /etc/yum.repos.d/<span style="color: rgba(0, 0, 0, 1)">
[</span>2-05@localhost yum.repos.d]$ lsneokylin.repo&nbsp; neokylin-updates.repo</pre>
</div>
<p> </p>
<p>2.删除原有的yum源</p>
<pre data-index="2"><code class="hljs language-crystal">[<span class="hljs-number">2-<span class="hljs-number">05<span class="hljs-variable">@localhost yum.repos.d]<span class="hljs-variable">$ rm -f *
</span></span></span></span></code></pre>
<p>3.使用vim编辑器创建一个新的配置文件(文件名称可随意,但后缀必须为.repo)</p>
<pre data-index="3"><code class="hljs language-crystal">[<span class="hljs-number">2-<span class="hljs-number">05<span class="hljs-variable">@localhost yum.repos.d]<span class="hljs-variable">$ sudo vim mirrors.<span class="hljs-number">163.com.repo 配置参数: [<span class="hljs-number">2-<span class="hljs-number">05<span class="hljs-variable">@localhost yum.repos.d]<span class="hljs-variable">$ cat mirrors.<span class="hljs-number">163.com.reponame=mirrors.<span class="hljs-number">163.combaseurl=<span class="hljs-symbol">http:/<span class="hljs-regexp">/mirrors.163.com/centos<span class="hljs-regexp">/7/os<span class="hljs-regexp">/x86_64/enabled=<span class="hljs-number">1gpgcheck=<span class="hljs-number">0
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></code></pre>
<p>4.检查配置是否正确</p>
<pre data-index="4"><code class="hljs language-crystal">[<span class="hljs-number">2-<span class="hljs-number">05<span class="hljs-variable">@localhost yum.repos.d]<span class="hljs-variable">$ yum repolist已加载插件:langpacksmirrors.<span class="hljs-number">163.com | <span class="hljs-number">3.6 kB<span class="hljs-number">00:<span class="hljs-number">00:<span class="hljs-number">00 (<span class="hljs-number">1/<span class="hljs-number">2): mirrors.<span class="hljs-number">163.com/group_gz | <span class="hljs-number">166 kB<span class="hljs-number">00:<span class="hljs-number">00:<span class="hljs-number">00 (<span class="hljs-number">2/<span class="hljs-number">2): mirrors.<span class="hljs-number">163.com/primary_db | <span class="hljs-number">6.0 MB<span class="hljs-number">00:<span class="hljs-number">00:<span class="hljs-number">01 源标识 源名称 状态mirrors.<span class="hljs-number">163.com mirrors.<span class="hljs-number">163.com <span class="hljs-number">10,<span class="hljs-number">019<span class="hljs-symbol">repolist: <span class="hljs-number">10,<span class="hljs-number">019
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></code></pre>
<p>5.更新Yum缓存</p>
<pre data-index="5"><code class="hljs language-ruby"><span class="hljs-comment">#yum list#yum clean all #yum makecache
</span></span></span></span></code></pre>
<h1 id="httpslgushujisitealiyunyum">中标麒麟-阿里云yum源配置</h1>
<p>1.在线下载【需要连网】</p>
<div class="cnblogs_code">
<pre>wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo</pre>
</div>
<p>2.Centos-7.repo文件中以$开始的变量进行替换</p>
<div class="cnblogs_code">
<pre>sed -i's/$releasever/7/g' /etc/yum.repos.d/CentOS-Base.repo</pre>
</div>
<p>3.使用vim编辑器创建一个新的配置文件(文件名称可随意,但后缀必须为.repo)</p>
<div class="cnblogs_code">
<pre>$ sudo vim mirrors.163.com.repo <br>配置参数: <br>$ cat mirrors.163.com.reponame=mirrors.163.combaseurl=http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.163.com/centos/7/os/x86_64/enabled=1gpgcheck=0</span></pre>
</div>
<p>4.检查配置是否正确</p>
<div class="cnblogs_code">
<pre>$ yum repolist<br>已加载插件:langpacksmirrors.163.com | 3.6 kB00:00:00 (1/2): mirrors.163.com/group_gz | 166 kB00:00:00 (2/2): mirrors.163.com/primary_db | 6.0 MB00:00:01 源标识 源名称 状态mirrors.163.com mirrors.163.com 10,019repolist: 10,019</pre>
</div>
<p>5.更新Yum缓存</p>
<div class="cnblogs_code">
<pre>#yum list<br>#yum clean all <br>#yum makecache</pre>
</div>
<h1 id="httpslgushujisitealiyunyum">中标麒麟-阿里云yum源配置</h1>
<p>1.在线下载【需要连网】</p>
<div class="cnblogs_code">
<pre>wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo</pre>
</div>
<p>2.Centos-7.repo文件中以$开始的变量进行替换</p>
<div class="cnblogs_code">
<pre>sed -i's/$releasever/7/g' /etc/yum.repos.d/CentOS-Base.repo</pre>
</div>
<p>3.更新yum缓存</p>
<div class="cnblogs_code">
<pre>清空缓存:yum clean all生成缓存:yum makecache</pre>
</div>
<h1 id="yum">中标麒麟-官方yum源配置</h1>
<p>注意 :操作系统使用的源不同可能会对整个操作系统产生影响,用户想要使用中标麒麟官方源,可按照下面配置 /etc/yum.repo.d/ 中的源文件。在/etc/yum.repo.d/ 文件夹中有neokylin.repo和neokylin-updates.repo两个文件配置如下:</p>
<p>neokylin.repo</p>
<div class="cnblogs_code">
<pre># cat neokylin.repo name= NeoKylin 7.0baseurl=http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">download.cs2c.com.cn/neokylin/desktop/releases/7.0/x86_64/zx/os/enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-neokylin-$basearch name= NeoKylin 7.0 32-bitbaseurl=http://download.cs2c.com.cn/neokylin/desktop/releases/7.0/i386/os/enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-neokylin-i386</span></pre>
</div>
<p>neokylin-updates.repo</p>
<div class="cnblogs_code">
<pre># cat neokylin-updates.repo name= NeoKylin 7.0 Updatesbaseurl=http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">download.cs2c.com.cn/neokylin/desktop/updates/7.0/x86_64/zx/os/enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-neokylin-$basearch name= NeoKylin 7.0 Updates 32-bitbaseurl=http://download.cs2c.com.cn/neokylin/desktop/updates/7.0/i386/os/enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-neokylin-i386</span></pre>
</div>
<p>问题:本人设置的官方yum源中,包含32位和64位yum源配置,在使用的时候可以根据自己的需求对yum源进行配置。本人在使用yum源【官方yum源、163或centos源都会出现这种问题】安装软件的时候会出现很多软件包依赖问题,解决办法在下面文章中。【在下在网上查找一种方法,使用 NeoKylin-Live-Desktop-7.0-SDK-x86_64-B036-20160811.iso 镜像安装软件解决依赖包问题,目前还在测试中 】</p>
<div class="cnblogs_code">
<pre>---> Package xml-commons-resolver.noarch 0:1.2-17.nd7.1 will be installed--> Finished Dependency ResolutionError: 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 foundError: 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 foundError: 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</pre>
</div>
<h1 id="20190915">2019-09-15【新增】</h1>
<p>进过多次折腾终于可以实现yum update更新</p>
<h3 id="1-1">1、实验环境:</h3>
<div class="cnblogs_code">
<pre># cat /etc/issueNeoKylin Linux Desktop release 7.0 (zhaoxin)Kernel \r on an \m (\l) # uname -aLinux 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# </pre>
</div>
<h3 id="2yum">2、官方yum源:</h3>
<div class="cnblogs_code">
<pre># cd /etc/yum.repos.d/ # lsneokylin.reponeokylin-updates.repo # cat neokylin* name= NeoKylin 7.0baseurl=http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">download.cs2c.com.cn/neokylin/desktop/releases/7.0/x86_64/zx/os/enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-neokylin-$basearchname= NeoKylin 7.0 Updatesbaseurl=http://download.cs2c.com.cn/neokylin/desktop/updates/7.0/x86_64/zx/os/enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-neokylin-$basearch </span></pre>
</div>
<h3 id="3">3、错误提示及解决:</h3>
<div class="cnblogs_code">
<pre># yum -y update--skip-brokenLoaded plugins: fastestmirror, langpacksLoading mirror speeds from cached hostfileResolving 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 <span style="color: rgba(0, 0, 255, 1)">else</span> and multilib version checking is just pointing out that there is a problem. Eg.: 1. You have an upgrade <span style="color: rgba(0, 0, 255, 1)">for</span> gtk3 which is missing some dependency that another package requires. Yum is trying to solve <span style="color: rgba(0, 0, 255, 1)">this</span> 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 <span style="color: rgba(0, 0, 255, 1)">try</span> redoing the upgrade <span style="color: rgba(0, 0, 255, 1)">with</span> --exclude gtk3.otherarch ... <span style="color: rgba(0, 0, 255, 1)">this</span> 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 <span style="color: rgba(0, 0, 255, 1)">for</span> 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# yum install gtk3Loaded plugins: fastestmirror, langpacksLoading mirror speeds from cached hostfileResolving Dependencies--> Running transaction check---> Package gtk3.x86_64 0:3.14.15-1.nd7.2 will be updated# 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!</pre>
</div>
<p> </p><br><br>
来源:https://www.cnblogs.com/yayuya/p/16914243.html
頁:
[1]