Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I am setting up a new, dedicated, centos 6.4 system with redis. I have installed redis many times, but have never hit this issue (and have never been on centos 6.4 before).

cd redis-2.6.16
sudo make install


    sh: ./ Permission denied
and later:
    zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory
    zmalloc.h:55:2: error: #error "Newer version of jemalloc required"

When I try to build jemalloc directly (from the /src area of the redis tarball), other errors include:

cd src && make jemalloc
sh: ./ Permission denied
make[1]: Entering directory `/tmp/rediswork/redis-2.6.16/src'
make[1]: *** No rule to make target `jemalloc'.  Stop.
make[1]: Leaving directory `/tmp/rediswork/redis-2.6.16/src'
make: *** [jemalloc] Error 2

I also tried redis 2.6.7 and have the same issue.

I have dug all over and can find no path forward.

share|improve this question

migrated from Oct 10 '13 at 17:38

This question came from our site for system and network administrators.… –  mixdev Jan 3 '14 at 6:00

8 Answers 8

I ran into the same issue on centos 6.4 and had to run the following commands:

cd deps
make hiredis jemalloc linenoise lua
cd ..
make install

I am not sure why the deps where not built, I thought they were in the past. However, this got me up and running with the version of redis that I needed.

share|improve this answer
Thanks, this worked for me on a centos 6.4 instance on EC2. –  theTuxRacer Feb 19 '14 at 13:55
make hiredis gave error for me, but the rest worked (on EC2 machine) –  Daniel Jul 23 at 7:57
Update: this worked: unset ARCH; make hiredis. From –  Daniel Jul 23 at 8:02

I had the same errors after a first failure caused by a missing package (gcc).
So after installing gcc, another make attempt gave these errors :

zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory
zmalloc.h:55:2: error: #error "Newer version of jemalloc required"

These errors were caused by some files left here after the failure of the first make command. Apparently I had to clean these files, with the command :

make distclean  

And then make again, and it worked.

Source :!topic/redis-db/-guYpX2OCSk

share|improve this answer
This worked for me on Ubuntu 14.04.2 LTS. I had the same scenario: ran make before installing build-essential and tcl8.5. –  NathanAldenSr Apr 30 at 14:24
didn't work for me –  Daniel Jul 23 at 7:52
up vote 3 down vote accepted

On this system /tmp was mounted noexec.

Redis runs a number of shell scripts from /tmp during its install, so the solution is to remount /tmp without the noexec flag. This does this temporarily:

mount -o remount,exec /tmp
share|improve this answer
How in hell does this resolve the error you posted in the question?! –  Michael Hampton Sep 30 '13 at 4:49
Hey, I do not know. But I know that a tech I am working with suggested it, and it did solve. I have installed/built redis several times, and have never hit this issue before. –  samsmith Sep 30 '13 at 4:50
@MichaelHampton some of the errors are "Access denied" errors during make. Error posted is the first error (I believe, the make output is loooong). –  samsmith Sep 30 '13 at 4:51
You should have posted the complete output. This question and answer make absolutely no sense together. –  Michael Hampton Sep 30 '13 at 4:52
Could it be that the system in question s 32bit? @MichaelHampton In that case , try make 32bit. –  Roman M Dec 30 '13 at 9:37

Did you try installing the package it asked for?

yum install jemalloc-devel

This can be found in the EPEL repository, which you should have already added to your CentOS system.

Come to think of it, redis is also in EPEL...

share|improve this answer
Yes, I did try that.... didn't help.... solution is above. –  samsmith Sep 30 '13 at 4:49

same problem that I met when make redis-3.0.0 on CentOS-6.6x86, try this to make it.

make MALLOC=libc
share|improve this answer

I had this issue after I killed the build part-way through and tried to make it again. make clean did not help so I nuked the directory and started over, and it compiled fine.

share|improve this answer

Resolved this for Redis 3.0.2 on RHEL-6.6 as follows:

From the Redis install directory,

  1. Run ./deps/ 3.6.0 (where 3.6.0 is the latest version of jemalloc that works with Redis 3.0.2 as of this writing)

  2. Run make distclean && make

share|improve this answer

At first, after extracting files from redis.<version>.tar.gz make failed because there was no gcc installed :

gcc: Command not found

So I installed gcc:

sudo yum install gcc-c++

Then I ran the make again ,I received :

zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory
zmalloc.h:55:2: error: #error "Newer version of jemalloc required"

I removed the redis extraced folder and re-extracted it from redis.<version>.tar.gz .Since gcc is installed this time , everything went successfully when I run make. I ran from inside redis extracted directory :

sudo make install

Hope it helps.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.