linux安装redis报错怎样解决
安装Redis进程中出现毛病多是由于多种缘由引发的,下面罗列一些常见的毛病及解决方法:
毛病:make: gcc: Command not found
或 cc: Command not found
解决方法:安装GCC编译器,可以通过运行命令 sudo apt-get install build-essential
来安装。
毛病:zmalloc.h:50:31: 毛病:jemalloc/jemalloc.h:没有那个文件或目录
解决方法:安装jemalloc库,可以通过运行命令 sudo apt-get install libjemalloc-dev
来安装。
毛病:Makefile:4:recipe for target 'all' failed
解决方法:检查是否是缺少依赖库,根据毛病提示安装相应的依赖库。
毛病:error while loading shared libraries: libjemalloc.so.2: cannot open shared object file: No such file or directory
解决方法:将jemalloc库的路径添加到系统的共享库路径中,可以通过将以下内容添加到 /etc/ld.so.conf
文件中,然后运行 sudo ldconfig
命令来解决:
/usr/local/lib
毛病:-bash: redis-server: command not found
解决方法:检查是否是正确配置了Redis的可履行路径,可以通过将Redis的可履行文件路径添加到系统的环境变量中来解决。
这些只是一些常见的毛病及解决方法,具体的毛病缘由和解决方法可能需要根据具体的毛病提示进行调查和解决。
TOP