Cent OS 7安装redis
在Cent OS 7安裝redis時
1、出現錯誤:make[3]: 進入目錄“/usr/enc/redis-4.0.6/deps/hiredis”
gcc -std=c99 -pedantic -c -O3 -fPIC? -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb? net.c
make[3]: gcc:命令未找到
原因是gcc未安裝
執行命令:yum install gcc?
???yum install gcc-c++
2、出現錯誤:make[1]: 進入目錄“/usr/enc/redis-4.0.6/src”
? ? CC adlist.o
In file included from adlist.c:34:0:
zmalloc.h:50:31: 致命錯誤:jemalloc/jemalloc.h:沒有那個文件或目錄
?#include <jemalloc/jemalloc.h>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^
編譯中斷。
執行命令:make MALLOC=libc
3:$make test出現問題:
cd src && make test
make[1]: 進入目錄“/usr/enc/redis-4.0.6/src”
? ? CC Makefile.dep
make[1]: 離開目錄“/usr/enc/redis-4.0.6/src”
make[1]: 進入目錄“/usr/enc/redis-4.0.6/src”
You need tcl 8.5 or newer in order to run the Redis test
make[1]: *** [test] 錯誤 1
make[1]: 離開目錄“/usr/enc/redis-4.0.6/src”
make: *** [test] 錯誤 2
解決:wget http://downloads.sourceforge.net/tcl/tcl8.6.1-src.tar.gz
sudo tar xzvf tcl8.6.1-src.tar.gz -C /usr/local/
cd /usr/local/tcl8.6.1/unix/
sudo ./configure
sudo make sudo make install
4、權限問題
出現錯誤:
Can't open the log file: Is a directory
如:[root@10-19-147-112 bin]# ls -l /usr/enc/redis-4.0.6/log/redis.log
-rw-r--r--. 1 root root 0 2月? ?2 18:52 /usr/enc/redis-4.0.6/log/redis.log
執行命令:chmod 777 /usr/enc/redis-4.0.6/log/redis.log
結果變成:-rwxrwxrwx. 1 root root 0 2月? ?2 18:52 /usr/enc/redis-4.0.6/log/redis.log
5、查看redis是否啟動
ps -ef | grep redis總結
以上是生活随笔為你收集整理的Cent OS 7安装redis的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 学习笔记9--深度前馈网络
- 下一篇: 手柄xinput模式_手游轮盘磨手怎么办