V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
paloalto
V2EX  ›  程序员

在Cent OS中用apt-get竟然装不了redis-server?

  •  
  •   paloalto · 2012-04-23 15:38:01 +08:00 · 5262 次点击
    这是一个创建于 4357 天前的主题,其中的信息可能已经有所发展或是发生改变。
    过程如下:

    1.我先update了一下:

    [root@vps ~]# sudo apt-get update
    Get:1 http://mirror.centos.org centos/5/os/i386 repomd.xml [1140B]
    Get:2 http://mirror.centos.org centos/5/updates/i386 repomd.xml [1953B]
    Get:3 http://mirror.centos.org centos/5/extras/i386 repomd.xml [2146B]
    Get:4 http://mirror.centos.org centos/5/fasttrack/i386 repomd.xml [1953B]
    Get:5 ftp://ftp.twaren.net 5/os/i386 repomd.xml [1140B]
    Get:6 ftp://ftp.twaren.net 5/updates/i386 repomd.xml [1953B]
    Get:7 ftp://ftp.twaren.net 5/extras/i386 repomd.xml [2146B]
    Get:8 ftp://ftp.twaren.net 5/fasttrack/i386 repomd.xml [1953B]
    Get:9 ftp://ftp.isu.edu.tw 5/os/i386 repomd.xml [1140B]
    Get:10 ftp://ftp.twaren.net 5/addons/i386 repomd.xml [1953B]
    Get:11 ftp://ftp.twaren.net 5/centosplus/i386 repomd.xml [1953B]
    Get:12 ftp://ftp.isu.edu.tw 5/updates/i386 repomd.xml [1953B]
    Get:13 ftp://ftp.isu.edu.tw 5/extras/i386 repomd.xml [2146B]
    Get:14 ftp://ftp.isu.edu.tw 5/fasttrack/i386 repomd.xml [1953B]
    Get:15 ftp://ftp.isu.edu.tw 5/addons/i386 repomd.xml [1953B]
    Get:16 ftp://ftp.isu.edu.tw 5/centosplus/i386 repomd.xml [1953B]
    Fetched 29.4kB in 9s (3134B/s)
    Hit http://mirror.centos.org centos/5/os/i386/ primary.xml
    Hit http://mirror.centos.org centos/5/os/i386/ filelists.xml
    Hit http://mirror.centos.org centos/5/updates/i386/ primary.sqlite
    Hit http://mirror.centos.org centos/5/updates/i386/ filelists.sqlite
    Hit http://mirror.centos.org centos/5/extras/i386/ primary.sqlite
    Hit http://mirror.centos.org centos/5/extras/i386/ filelists.sqlite
    Hit http://mirror.centos.org centos/5/fasttrack/i386/ primary.sqlite
    Hit http://mirror.centos.org centos/5/fasttrack/i386/ filelists.sqlite
    Hit ftp://ftp.twaren.net 5/os/i386/ primary.xml
    Hit ftp://ftp.twaren.net 5/os/i386/ filelists.xml
    Hit ftp://ftp.twaren.net 5/updates/i386/ primary.sqlite
    Hit ftp://ftp.twaren.net 5/updates/i386/ filelists.sqlite
    Hit ftp://ftp.twaren.net 5/extras/i386/ primary.sqlite
    Hit ftp://ftp.twaren.net 5/extras/i386/ filelists.sqlite
    Hit ftp://ftp.twaren.net 5/fasttrack/i386/ primary.sqlite
    Hit ftp://ftp.twaren.net 5/fasttrack/i386/ filelists.sqlite
    Hit ftp://ftp.twaren.net 5/addons/i386/ primary.sqlite
    Hit ftp://ftp.twaren.net 5/addons/i386/ filelists.sqlite
    Hit ftp://ftp.twaren.net 5/centosplus/i386/ primary.sqlite
    Hit ftp://ftp.twaren.net 5/centosplus/i386/ filelists.sqlite
    Hit ftp://ftp.isu.edu.tw 5/os/i386/ primary.xml
    Hit ftp://ftp.isu.edu.tw 5/os/i386/ filelists.xml
    Hit ftp://ftp.isu.edu.tw 5/updates/i386/ primary.sqlite
    Hit ftp://ftp.isu.edu.tw 5/updates/i386/ filelists.sqlite
    Hit ftp://ftp.isu.edu.tw 5/extras/i386/ primary.sqlite
    Hit ftp://ftp.isu.edu.tw 5/extras/i386/ filelists.sqlite
    Hit ftp://ftp.isu.edu.tw 5/fasttrack/i386/ primary.sqlite
    Hit ftp://ftp.isu.edu.tw 5/fasttrack/i386/ filelists.sqlite
    Hit ftp://ftp.isu.edu.tw 5/addons/i386/ primary.sqlite
    Hit ftp://ftp.isu.edu.tw 5/addons/i386/ filelists.sqlite
    Hit ftp://ftp.isu.edu.tw 5/centosplus/i386/ primary.sqlite
    Hit ftp://ftp.isu.edu.tw 5/centosplus/i386/ filelists.sqlite
    Reading Package Lists... Done
    Building Dependency Tree... Done

    2.然后先搜索一下:
    [root@vps ~]# apt-cache search redis
    redhat-logos - CentOS-related icons and pictures.

    竟然搜索不到!Orz...

    3.试试直接装:
    [root@vps ~]# sudo apt-get install redis-server
    Reading Package Lists... Done
    Building Dependency Tree... Done
    E: Couldn't find package redis-server

    这货竟然找不到redis-server!!让我情何以堪啊!!


    那么....
    是不是我的sources.list文件不对?
    ————————贴出我的sources.list——————

    # Name: Operating system and updates

    ### Red Hat Enterprise Linux
    repomd http://mirror.centos.org centos/$(VERSION)/os/$(ARCH)
    repomd http://mirror.centos.org centos/$(VERSION)/updates/$(ARCH)
    repomd http://mirror.centos.org centos/$(VERSION)/extras/$(ARCH)
    repomd http://mirror.centos.org centos/$(VERSION)/fasttrack/$(ARCH)
    #repomd http://mrepo rhel$(VERSION)s-$(ARCH)/RPMS.os
    #repomd http://mrepo rhel$(VERSION)s-$(ARCH)/RPMS.updates
    #rpm http://mrepo rhel$(VERSION)s-$(ARCH) os updates

    ### Fedora Core Linux
    #repomd http://ayo.freshrpms.net fedora/linux/$(VERSION)/$(ARCH)/core
    #repomd http://ayo.freshrpms.net fedora/linux/$(VERSION)/$(ARCH)/updates
    #rpm http://ayo.freshrpms.net fedora/linux/$(VERSION)/$(ARCH) core updates

    ### Red Hat Linux
    #repomd http://ayo.freshrpms.net redhat/$(VERSION)/$(ARCH)/os
    #repomd http://ayo.freshrpms.net redhat/$(VERSION)/$(ARCH)/updates
    #rpm http://ayo.freshrpms.net redhat/$(VERSION)/$(ARCH) os updates

    #rpm http://ayo.freshrpms.net fedora/linux/4/i386 core extras updates freshrpms
    #rpm http://rpm.livna.org/ fedora/4/i386 lvn

    repomd ftp://ftp.isu.edu.tw/pub/Linux/CentOS $(VERSION)/os/$(ARCH)
    repomd ftp://ftp.isu.edu.tw/pub/Linux/CentOS $(VERSION)/updates/$(ARCH)
    repomd ftp://ftp.isu.edu.tw/pub/Linux/CentOS $(VERSION)/extras/$(ARCH)
    repomd ftp://ftp.isu.edu.tw/pub/Linux/CentOS $(VERSION)/fasttrack/$(ARCH)
    repomd ftp://ftp.isu.edu.tw/pub/Linux/CentOS $(VERSION)/addons/$(ARCH)
    repomd ftp://ftp.isu.edu.tw/pub/Linux/CentOS $(VERSION)/centosplus/$(ARCH)
    repomd ftp://ftp.twaren.net/Linux/CentOS $(VERSION)/os/$(ARCH)
    repomd ftp://ftp.twaren.net/Linux/CentOS $(VERSION)/updates/$(ARCH)
    repomd ftp://ftp.twaren.net/Linux/CentOS $(VERSION)/extras/$(ARCH)
    repomd ftp://ftp.twaren.net/Linux/CentOS $(VERSION)/fasttrack/$(ARCH)
    repomd ftp://ftp.twaren.net/Linux/CentOS $(VERSION)/addons/$(ARCH)
    repomd ftp://ftp.twaren.net/Linux/CentOS $(VERSION)/centosplus/$(ARCH)


    求指教~~~
    9 条回复    1970-01-01 08:00:00 +08:00
    itopidea
        1
    itopidea  
       2012-04-23 15:42:25 +08:00   ❤️ 2
    centos 我还没用过apt-get呢,哈哈apt-get是deb包的管理方式,怎么使用到rpm包上呢。
    Tianpu
        2
    Tianpu  
       2012-04-23 15:43:00 +08:00
    centos不是yum吗?
    paloalto
        3
    paloalto  
    OP
       2012-04-23 15:47:05 +08:00   ❤️ 1
    @Tianpu 用yum可以装redis-server吗?唉,我以为yum适合装那种比较系统级的东西呢。

    我去试试。。找到一篇安装教程。 http://hi.baidu.com/guigangsky/blog/item/ac0df12a5536af32d52af1e7.html
    Tianpu
        4
    Tianpu  
       2012-04-23 15:50:00 +08:00   ❤️ 1
    @paloalto 关键是一般不用apt-get来管理centos包,rhel系列还是用yum比较好些

    交叉使用不是不可以 只是会有很多的不兼容吧
    Tianpu
        5
    Tianpu  
       2012-04-23 15:50:44 +08:00
    @paloalto 记得感谢我下 我花了15个铜币来回复 怎么才能增加呢?
    freetstar
        6
    freetstar  
       2012-04-23 15:51:42 +08:00   ❤️ 2
    还是用yum安装吧,比较稳妥,apt-install采用deb包,很容易乱
    highkay
        7
    highkay  
       2012-04-23 15:53:00 +08:00   ❤️ 2
    用ubuntu的sourcelist就可以把,官方源里面就有redis-server
    paloalto
        8
    paloalto  
    OP
       2012-04-23 15:53:41 +08:00   ❤️ 1
    豆瓣上有人回复说是因为cent os的系统太陈旧了,连安装源都找不到。。。
    7gong
        9
    7gong  
       2012-04-23 16:16:19 +08:00
    果断 yum install 各种linux发行版无视用户不是一天两天了,除了作为服务器运行,桌面应用是典型的折磨自己。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2998 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 14:57 · PVG 22:57 · LAX 07:57 · JFK 10:57
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.