V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Recommended Services
Amazon Web Services
LeanCloud
New Relic
ClearDB
Livid
V2EX  ›  云计算

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

  •  
  •   Livid · 2012-03-17 01:14:13 +08:00 · 4033 次点击
    这是一个创建于 4668 天前的主题,其中的信息可能已经有所发展或是发生改变。
    因为要通过 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 了。
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1970 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 16:14 · PVG 00:14 · LAX 08:14 · JFK 11:14
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.