Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue with Redis install "cc: Command not found"

Tags:

gcc

redis

Installing redis is really easy. I have done it on several VM. But on one instance, I am facing the following problem.

[root@server redis-2.4.2]# make cd src && make all make[1]: Entering directory `/home/user/redis-2.4.2/src' MAKE hiredis make[2]: Entering directory `/home/user/redis-2.4.2/deps/hiredis' cc -c -std=c99 -pedantic -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings    -g -ggdb  net.c make[2]: cc: Command not found make[2]: *** [net.o] Error 127 make[2]: Leaving directory `/home/user/redis-2.4.2/deps/hiredis' make[1]: *** [dependencies] Error 2 make[1]: Leaving directory `/home/user/redis-2.4.2/src' make: *** [all] Error 2 

Is there any other way to install redis?

like image 220
shantanuo Avatar asked Nov 15 '11 03:11

shantanuo


People also ask

What is CC Command Linux?

cc command is stands for C Compiler, usually an alias command to gcc or clang. As the name suggests, executing the cc command will usually call the gcc on Linux systems. It is used to compile the C language codes and create executables. The number of options available for the cc command is very high.


1 Answers

wget http://download.redis.io/redis-stable.tar.gz

tar xvzf redis-stable.tar.gz

cd redis-stable

sudo apt-get install make

sudo apt-get install gcc

sudo apt-get install tcl

sudo apt-get install build-essential

sudo apt-get update

## if there is another error like "fatal error: jemalloc/jemalloc.h: No such file or directory"

## just run "make distclean"

make

make test

like image 99
Kane.Sun Avatar answered Sep 18 '22 20:09

Kane.Sun