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

2012-04-23 15:38:01 +08:00
 paloalto
过程如下:

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)


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

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

交叉使用不是不可以 只是会有很多的不兼容吧
Tianpu
2012-04-23 15:50:44 +08:00
@paloalto 记得感谢我下 我花了15个铜币来回复 怎么才能增加呢?
freetstar
2012-04-23 15:51:42 +08:00
还是用yum安装吧,比较稳妥,apt-install采用deb包,很容易乱
highkay
2012-04-23 15:53:00 +08:00
用ubuntu的sourcelist就可以把,官方源里面就有redis-server
paloalto
2012-04-23 15:53:41 +08:00
豆瓣上有人回复说是因为cent os的系统太陈旧了,连安装源都找不到。。。
7gong
2012-04-23 16:16:19 +08:00
果断 yum install 各种linux发行版无视用户不是一天两天了,除了作为服务器运行,桌面应用是典型的折磨自己。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/33092

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX