MiddleWare MiddleWare - 1 year ago 271
Linux Question

Redis - linux / Error when Installing redis on linux: `cc: command not found`

I wish to install redis on my red-hat environment. I do the following:

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

I got the next error:

make[3]: *** [net.o] Error 127
make[3]: Leaving directory `/tmp/redis-stable/deps/hiredis'
make[2]: *** [hiredis] Error 2
make[2]: Leaving directory `/tmp/redis-stable/deps'
make[1]: [persist-settings] Error 2 (ignored)
CC adlist.o
/bin/sh: cc: command not found
make[1]: *** [adlist.o] Error 127
make[1]: Leaving directory `/tmp/redis-stable/src'
make: *** [all] Error 2

How can I fix it?

Answer Source

You are trying to install redis from source code. What this process do is to compile and create executable on your machine and then install it. For doing this you need various tools like gcc etc. Best way is to install all of them together by installing that group. Run this from terminal

yum grouplist 

This will show all groups available and then choose group you want to install or run directly

yum groupinstall 'Development Tools'

This will save you from other problems which might come in future while installing from source.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download