I wish to install redis on my red-hat environment. I do the following:
我希望在我的红帽环境中安装redis。我做以下几点:
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
I got the next error:
我得到了下一个错误:
make[3]: *** [net.o] Error 127
make[3]: Leaving directory `/tmp/redis-stable/deps/hiredis'
make[2]: *** [hiredis] Error 2
make[2]: Leaving directory `/tmp/redis-stable/deps'
make[1]: [persist-settings] Error 2 (ignored)
CC adlist.o
/bin/sh: cc: command not found
make[1]: *** [adlist.o] Error 127
make[1]: Leaving directory `/tmp/redis-stable/src'
make: *** [all] Error 2
How can I fix it?
我怎样才能修好它呢?
3 个解决方案
#1
20
You are trying to install redis
from source code. What this process do is to compile and create executable on your machine and then install it. For doing this you need various tools like gcc
etc. Best way is to install all of them together by installing that group. Run this from terminal
您正在尝试从源代码中安装redis。这个过程在您的机器上编译并创建可执行文件,然后安装它。要做到这一点,您需要使用各种工具,如gcc等。最好的方法是通过安装该组将所有工具安装在一起。从终端运行这个
yum grouplist
This will show all groups available and then choose group you want to install or run directly
这将显示所有可用的组,然后选择要安装或直接运行的组
yum groupinstall 'Development Tools'
This will save you from other problems which might come in future while installing from source.
这将使您避免将来从源代码安装时可能遇到的其他问题。
#2
11
for those of you who encounter this error
对于你们中遇到这个错误的人
检查这github的问题
before make run this command
在执行此命令之前
$ cd deps; make hiredis lua jemalloc linenoise
#3
-1
Come out from your extracted folder/Dir
and remove the extracted redis-x.x.x
folder with rm -rf redis-x.x.x
从提取的文件夹/目录中取出提取的redis-x.x。具有rm -rf redis-x.x.x的文件夹
now again extract the redis
folder with tar xzf redis-x.x.x.tar.gz
现在再次使用tar xzf redis-x.x.x.tar.gz提取redis文件夹
go to redis directory
again and run the make or make test again. it works for me.
再次进入redis目录并再次运行make或make测试。它适合我。
#1
20
You are trying to install redis
from source code. What this process do is to compile and create executable on your machine and then install it. For doing this you need various tools like gcc
etc. Best way is to install all of them together by installing that group. Run this from terminal
您正在尝试从源代码中安装redis。这个过程在您的机器上编译并创建可执行文件,然后安装它。要做到这一点,您需要使用各种工具,如gcc等。最好的方法是通过安装该组将所有工具安装在一起。从终端运行这个
yum grouplist
This will show all groups available and then choose group you want to install or run directly
这将显示所有可用的组,然后选择要安装或直接运行的组
yum groupinstall 'Development Tools'
This will save you from other problems which might come in future while installing from source.
这将使您避免将来从源代码安装时可能遇到的其他问题。
#2
11
for those of you who encounter this error
对于你们中遇到这个错误的人
检查这github的问题
before make run this command
在执行此命令之前
$ cd deps; make hiredis lua jemalloc linenoise
#3
-1
Come out from your extracted folder/Dir
and remove the extracted redis-x.x.x
folder with rm -rf redis-x.x.x
从提取的文件夹/目录中取出提取的redis-x.x。具有rm -rf redis-x.x.x的文件夹
now again extract the redis
folder with tar xzf redis-x.x.x.tar.gz
现在再次使用tar xzf redis-x.x.x.tar.gz提取redis文件夹
go to redis directory
again and run the make or make test again. it works for me.
再次进入redis目录并再次运行make或make测试。它适合我。