在 centos 6.4 上制作 redis 的 jemalloc 和其他错误

Jon*_*ica 46 make centos

我正在使用 redis 建立一个新的、专用的 centos 6.4 系统。我已经安装过很多次 redis,但是从来没有遇到过这个问题(之前也从来没有在 centos 6.4 上)。

cd redis-2.6.16
sudo make install
Run Code Online (Sandbox Code Playgroud)

错误:

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"
Run Code Online (Sandbox Code Playgroud)

当我尝试直接构建 jemalloc 时(从 redis tarball 的 /src 区域),其他错误包括:

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
Run Code Online (Sandbox Code Playgroud)

我也试过 redis 2.6.7 也有同样的问题。

我已经挖遍了,找不到前进的道路。

Ray*_*ter 112

我在 centos 6.4 上遇到了同样的问题,不得不运行以下命令:

cd deps
make hiredis jemalloc linenoise lua geohash-int
cd ..
make install
Run Code Online (Sandbox Code Playgroud)

我不知道为什么没有建造 deps,我以为它们是过去的。然而,这让我开始使用我需要的 redis 版本。

  • 更新:这有效:`unset ARCH; 让hiredis`。来自 https://github.com/redis/hiredis-rb/issues/2 (2认同)
  • Ubuntu 18.04 上的相同问题,此修复程序也对我有用 (2认同)
  • 下面@Clemorphy 的解决方案指出,这可能是由先前失败的 `make` 命令的剩余文件引起的 - 他的回答简洁而优雅,请查看。 (2认同)

小智 83

由于缺少包(gcc)导致第一次失败后,我遇到了同样的错误。
所以在安装 gcc 后,另make一次尝试给出了这些错误:

zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory
zmalloc.h:55:2: error: #error "Newer version of jemalloc required"
Run Code Online (Sandbox Code Playgroud)

这些错误是由第一个make命令失败后遗留在这里的一些文件引起的。显然我必须使用以下命令清理这些文件:

make distclean  
Run Code Online (Sandbox Code Playgroud)

然后make又一次,它奏效了。

来源:https : //groups.google.com/forum/#!topic/redis- db/ -guYpX2OCSk


Jon*_*ica 4

在这个系统上/tmp安装了noexec

Redis 在安装过程中会运行许多 shell 脚本/tmp,因此解决方案是/tmp在不使用该noexec标志的情况下重新挂载。暂时这样做:

mount -o remount,exec /tmp
Run Code Online (Sandbox Code Playgroud)

我应该补充一点,这个解决方案适用于所有 redis 2.x 和 3.x 版本(4.x 对我来说是未知的)

  • 您应该发布完整的输出。这个问题和答案放在一起完全没有意义。 (4认同)