Reputation: 3550
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
make
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?
Upvotes: 25
Views: 31186
Reputation: 691
I had the same issue, working with ubi8/ubi-minimal. The make
command kept failing until I installed gcc
as well:
RUN microdnf -y update \
&& microdnf install -y tar.x86_64 gzip bash make bind-utils gcc \
&& microdnf clean all
If you look at the redis Dockerfile, you will see that it is used there as well.
Upvotes: 0
Reputation: 31199
If you're not an advanced user maybe it is not a good idea to install REDIS from the source.
Instead you should install a packaged version. For example on Fedora / Centos / RHEL:
sudo yum install redis
Upvotes: 3
Reputation: 401
Install build essential first
sudo apt-get install build-essential
then install the dependencies
cd deps
make hiredis lua jemalloc linenoise
Upvotes: 5
Reputation: 19
Come out from your extracted folder/Dir
and remove the extracted redis-x.x.x
folder with rm -rf redis-x.x.x
now again extract the redis
folder with tar xzf redis-x.x.x.tar.gz
go to redis directory
again and run the make or make test again. it works for me.
Upvotes: 0
Reputation: 340
for those of you who encounter this error
before make run this command
$ cd deps; make hiredis lua jemalloc linenoise
Upvotes: 16
Reputation: 2727
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.
Upvotes: 36