关于阿里云弹性云计算主机无法安装 gcc 的问题

2012-03-17 01:14:13 +08:00
 Livid
因为要通过 pip 安装 MySQLdb,于是需要 gcc 编译,但是 yum install gcc 的时候得到如下提示:

# yum install gcc
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* epel: mirrors.ustc.edu.cn
* extras: mirrors.grandcloud.cn
* updates: mirrors.grandcloud.cn
Excluding Packages in global exclude list
Finished
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.1.2-52.el5 set to be updated
--> Processing Dependency: cpp = 4.1.2-52.el5 for package: gcc
--> Processing Dependency: libgomp >= 4.1.2-52.el5 for package: gcc
--> Processing Dependency: libgcc >= 4.1.2-52.el5 for package: gcc
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc
--> Running transaction check
---> Package cpp.x86_64 0:4.1.2-52.el5 set to be updated
---> Package glibc-devel.x86_64 0:2.5-81 set to be updated
--> Processing Dependency: glibc-headers = 2.5-81 for package: glibc-devel
--> Processing Dependency: glibc-headers for package: glibc-devel
---> Package libgcc.i386 0:4.1.2-52.el5 set to be updated
---> Package libgcc.x86_64 0:4.1.2-52.el5 set to be updated
---> Package libgomp.x86_64 0:4.4.6-3.el5.1 set to be updated
--> Running transaction check
---> Package glibc-headers.x86_64 0:2.5-81 set to be updated
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers
--> Processing Dependency: kernel-headers for package: glibc-headers
--> Finished Dependency Resolution
glibc-headers-2.5-81.x86_64 from base has depsolving problems
--> Missing Dependency: kernel-headers >= 2.2.1 is needed by package glibc-headers-2.5-81.x86_64 (base)
glibc-headers-2.5-81.x86_64 from base has depsolving problems
--> Missing Dependency: kernel-headers is needed by package glibc-headers-2.5-81.x86_64 (base)
Error: Missing Dependency: kernel-headers is needed by package glibc-headers-2.5-81.x86_64 (base)
Error: Missing Dependency: kernel-headers >= 2.2.1 is needed by package glibc-headers-2.5-81.x86_64 (base)
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest

解决办法是,打开 /etc/yum.conf 然后找到这行:

exclude=kernel*

修改为:

exclude=

就可以安装 gcc 了。
4032 次点击
所在节点    云计算
0 条回复

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

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

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

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

© 2021 V2EX