zoukankan      html  css  js  c++  java
  • redis:编译时报错 /bin/sh: cc: command not found

    [root@hadoop01 redis-3.0.0]# make
    cd src && make all
    make[1]: Entering directory `/usr/local/redis-3.0.0/src'
    rm -rf redis-server redis-sentinel redis-cli redis-benchmark redis-check-dump redis-check-aof *.o *.gcda *.gcno *.gcov redis.info lcov-html
    (cd ../deps && make distclean)
    make[2]: Entering directory `/usr/local/redis-3.0.0/deps'
    (cd hiredis && make clean) > /dev/null || true
    (cd linenoise && make clean) > /dev/null || true
    (cd lua && make clean) > /dev/null || true
    (cd jemalloc && [ -f Makefile ] && make distclean) > /dev/null || true
    (rm -f .make-*)
    make[2]: Leaving directory `/usr/local/redis-3.0.0/deps'
    (rm -f .make-*)
    echo STD=-std=c99 -pedantic >> .make-settings
    echo WARN=-Wall -W >> .make-settings
    echo OPT=-O2 >> .make-settings
    echo MALLOC=jemalloc >> .make-settings
    echo CFLAGS= >> .make-settings
    echo LDFLAGS= >> .make-settings
    echo REDIS_CFLAGS= >> .make-settings
    echo REDIS_LDFLAGS= >> .make-settings
    echo PREV_FINAL_CFLAGS=-std=c99 -pedantic -Wall -W -O2 -g -ggdb   -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -DUSE_JEMALLOC -I../deps/jemalloc/include >> .make-settings
    echo PREV_FINAL_LDFLAGS=  -g -ggdb -rdynamic >> .make-settings
    (cd ../deps && make hiredis linenoise lua jemalloc)
    make[2]: Entering directory `/usr/local/redis-3.0.0/deps'
    (cd hiredis && make clean) > /dev/null || true
    (cd linenoise && make clean) > /dev/null || true
    (cd lua && make clean) > /dev/null || true
    (cd jemalloc && [ -f Makefile ] && make distclean) > /dev/null || true
    (rm -f .make-*)
    (echo "" > .make-ldflags)
    (echo "" > .make-cflags)
    MAKE hiredis
    cd hiredis && make static
    make[3]: Entering directory `/usr/local/redis-3.0.0/deps/hiredis'
    gcc -std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb  net.c
    make[3]: gcc:命令未找到
    make[3]: *** [net.o] 错误 127
    make[3]: Leaving directory `/usr/local/redis-3.0.0/deps/hiredis'
    make[2]: *** [hiredis] 错误 2
    make[2]: Leaving directory `/usr/local/redis-3.0.0/deps'
    make[1]: [persist-settings] 错误 2 (忽略)
        CC adlist.o
    /bin/sh: cc: command not found
    make[1]: *** [adlist.o] 错误 127
    make[1]: Leaving directory `/usr/local/redis-3.0.0/src'
    make: *** [all] 错误 2
    
    
    提示gcc和cc命令令未找到

    解决方法

    yum -y install gcc gcc-c++ libstdc++-devel
    
  • 相关阅读:
    【转】WCF入门教程六[一个简单的Demo]
    【转】WCF入门教程五[WCF的通信模式]
    【转】WCF入门教程四[WCF的配置文件]
    【转】WCF入门教程三[WCF的宿主]
    【转】WCF入门教程二[WCF应用的通信过程]
    【转】WCF入门教程一[什么是WCF]
    【转】浅谈.net remoting 与webservice
    【转】Microsoft .Net Remoting之Remoting事件处理全接触
    egret升级经验记录
    cmder小技巧
  • 原文地址:https://www.cnblogs.com/drl-blogs/p/11086831.html
Copyright © 2011-2022 走看看