Redis安装问题"cc:找不到命令" [英] Issue with Redis install "cc: Command not found"
本文介绍了Redis安装问题"cc:找不到命令"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
安装redis真的很容易.我已经在几个虚拟机上完成了.但是有一次,我面临着以下问题.
Installing redis is really easy. I have done it on several VM. But on one instance, I am facing the following problem.
[root@server redis-2.4.2]# make
cd src && make all
make[1]: Entering directory `/home/user/redis-2.4.2/src'
MAKE hiredis
make[2]: Entering directory `/home/user/redis-2.4.2/deps/hiredis'
cc -c -std=c99 -pedantic -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c
make[2]: cc: Command not found
make[2]: *** [net.o] Error 127
make[2]: Leaving directory `/home/user/redis-2.4.2/deps/hiredis'
make[1]: *** [dependencies] Error 2
make[1]: Leaving directory `/home/user/redis-2.4.2/src'
make: *** [all] Error 2
还有其他安装Redis的方法吗?
Is there any other way to install redis?
推荐答案
make[2]: cc: Command not found
这意味着c编译器已卸载,或者它不在$PATH
中.
This means that c compiler is uninstalled, or that it's not in $PATH
.
尝试使用which cc
,这应该告诉目录cc
的安装位置(如果已安装).
Try which cc
, this should tell the directory where cc
is installed, if it is.
否则,您可以使用发行版存储库进行安装.
Otherwise, you can use your distro repository to install it.
在Ubuntu中:sudo aptitude install build-essential
.
这篇关于Redis安装问题"cc:找不到命令"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文