46

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

error:

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 Answers9

115

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.

Ray Hunter
  • 1,286
  • 1
  • 8
  • 6
83

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

Clemorphy
  • 931
  • 6
  • 5
4

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?! – Michael Hampton Sep 30 '13 at 04: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. –  Sep 30 '13 at 04: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). –  Sep 30 '13 at 04:51
  • 4
    You should have posted the complete output. This question and answer make absolutely no sense together. – Michael Hampton Sep 30 '13 at 04:52
  • Could it be that the system in question s 32bit? @MichaelHampton In that case , try make 32bit. – Roman M Dec 30 '13 at 09:37
  • @RomanM No, it is not a 32 bit question. The problem is that I was trying to build it in a dir struct where only had read access. The problem under the problem is that the makefile assumes write access, and does not give a clear error. – Jonesome Reinstate Monica Dec 30 '13 at 17:25
  • @MichaelHampton fwiw, I just hit the issue again, on a fresh centos 6.7 system. I enhanced the OP above to show the earlier access denied error, which is resolved by the remount command above. The root issue, I believe, is that I am using a subdir of /tmp as my workdir, which appears to be a bad practice that I will change. I hope this addresses your concern from 3 yrs ago. – Jonesome Reinstate Monica Dec 15 '16 at 05:54
  • Yes, now the question makes sense with the answer. – Michael Hampton Dec 15 '16 at 05:56
1

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

KAGasser
  • 11
  • 1
1

Its happen due to dirty make file so before run

$ sudo make  

run this:

$ make distclean

sure it'll solve all dependencies.

manendra
  • 11
  • 1
1

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...

Michael Hampton
  • 8,658
  • 2
  • 31
  • 54
0

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

make MALLOC=libc
gokaka
  • 1
  • 1
0

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.

nullability
  • 998
  • 6
  • 7
0

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
Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
App Work
  • 115
  • 3