我是靠谱客的博主 自然老鼠,最近开发中收集的这篇文章主要介绍使用sohu的网络yum源操作步骤,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

一,下载yum的repo文件:

   yum -y install wget

   cd /etc/yum.repos.d/

   wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo


二,将其他的配置文件改名设置备份

  mv CentOS-Base.repo CentOS-Base.repo.bak


三,测试yum源可用性

  yum list | wc -l

  显示5313个包即为配置正确



配置sohu的网络yum源常见报错:

一,路径错误:

[root@localhost ~]# yum list | wc -l


http://mirrors.sohu.com/centos/6/addons/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"

Trying other mirror.

http://ftp.jaist.ac.jp/pub/Linux/CentOS/6/addons/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"

Trying other mirror.

解析:

此为配置路径错误

解决办法:

cd /etc/yum.repos.d/

vim  CentOS-Base-sohu.repo

找到addons修改为os即可

wkiol1ennyshtpwgaaa7edyvbrg407.png-wh_50

wkiom1ennyxaqzhgaaa7xxbot6m473.png-wh_50

然后执行

yum makecache

问题解决。


二,进程占用

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

Loaded plugins: fastestmirror

Existing lock /var/run/yum.pid: another copy is running as pid 1224.

Another app is currently holding the yum lock; waiting for it to exit...

  The other application is: yum

    Memory :  14 M RSS (142 MB VSZ)

    Started: Tue Jul 19 19:41:24 2016 - 00:12 ago

    State  : Traced/Stopped, pid: 1224

Another app is currently holding the yum lock; waiting for it to exit...

  The other application is: yum

    Memory :  14 M RSS (142 MB VSZ)

    Started: Tue Jul 19 19:41:24 2016 - 00:14 ago

    State  : Traced/Stopped, pid: 1224

^Z


解决办法:

使用kill -9 强制杀死对应进程

kill -9 1224

wkiol1enopbwc60saabduqyjxdq150.png-wh_50

问题解决

转载于:https://blog.51cto.com/gaohl/1827709

最后

以上就是自然老鼠为你收集整理的使用sohu的网络yum源操作步骤的全部内容,希望文章能够帮你解决使用sohu的网络yum源操作步骤所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(60)

评论列表共有 0 条评论

立即
投稿
返回
顶部