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


MAKE jemalloc
cd jemalloc && ./configure --with-lg-quantum=3 --with-jemalloc-prefix=je_ --enable-cc-silence CFLAGS="-std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops " LDFLAGS=""
/bin/sh: ./configure: Permission denied
make[2]: *** [jemalloc] Error 126
make[2]: Leaving directory `/tmp/redis32/redis-3.2.6/deps'
make[1]: [persist-settings] Error 2 (ignored)

    sh: ./mkreleasehdr.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: ./mkreleasehdr.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.


9 Answers 9


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

cd deps
make hiredis jemalloc linenoise lua geohash-int
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.

  • 1
    Thanks, this worked for me on a centos 6.4 instance on EC2. Commented Feb 19, 2014 at 13:55
  • 2
    Update: this worked: unset ARCH; make hiredis. From github.com/redis/hiredis-rb/issues/2
    – Daniel
    Commented Jul 23, 2015 at 8:02
  • 1
    Worked for me on centos 7.
    – idea
    Commented Mar 22, 2017 at 4:47
  • 2
    Same issue on Ubuntu 18.04 and this fix worked for me too Commented Oct 6, 2018 at 5:37
  • 2
    @Clemorphy's solution below points out that this may be caused by leftover files from a previously failed make command - his answer is clean and elegant, check it out.
    – Ben
    Commented Jan 19, 2020 at 22:53

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 : https://groups.google.com/forum/#!topic/redis-db/-guYpX2OCSk

  • 1
    This worked for me on Ubuntu 14.04.2 LTS. I had the same scenario: ran make before installing build-essential and tcl8.5. Commented Apr 30, 2015 at 14:24
  • didn't work for me
    – Daniel
    Commented Jul 23, 2015 at 7:52
  • This is very much the right answer. Thank you.
    – Ben
    Commented Jan 19, 2020 at 22:51

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

I should add that this solution applies to all redis 2.x and 3.x versions (4.x is os far unknown to me)

  • 1
    How in hell does this resolve the error you posted in the question?! Commented Sep 30, 2013 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
    Commented Sep 30, 2013 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
    Commented Sep 30, 2013 at 4:51
  • 4
    You should have posted the complete output. This question and answer make absolutely no sense together. Commented Sep 30, 2013 at 4:52
  • Could it be that the system in question s 32bit? @MichaelHampton In that case , try make 32bit.
    – Roman M
    Commented Dec 30, 2013 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...

  • Yes, I did try that.... didn't help.... solution is above.
    – samsmith
    Commented Sep 30, 2013 at 4:49

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

From the Redis install directory,

  1. Run ./deps/update-jemalloc.sh 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


Its happen due to dirty make file so before run

$ sudo make  

run this:

$ make distclean

sure it'll solve all dependencies.


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

make MALLOC=libc

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.


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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .