在CentOS 5下安装memcached失败报如下错误:
[root@localhost memcached-1.4.20]# ./configure checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for gcc... no checking for cc... no checking for cl.exe... no configure: error: in `/app/source/memcached-1.4.20': configure: error: no acceptable C compiler found in $PATH See `config.log' for more details.
在网上稍微百度了一下“error: no acceptable C compiler found in $PATH” 这个关键词然后就找到了办法:
原因是缺少gcc组件。
于是一个命令搞定了:
yum -y install gcc
然后再次执行安装命令如下:
[root@localhost memcached-1.4.20]# ./configure checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for icc in use... no checking for clang in use... no checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking whether __SUNPRO_C is declared... no checking for gcc option to accept ISO C99... -std=gnu99 checking whether gcc -std=gnu99 and cc understand -c and -o together... yes checking sasl/sasl.h usability... no checking sasl/sasl.h presence... no checking for sasl/sasl.h... no checking for gcov... /usr/bin/gcov checking for main in -lgcov... yes checking for library containing clock_gettime... -lrt checking for library containing socket... none required checking for library containing gethostbyname... none required checking for libevent directory... configure: error: libevent is required. You can get it from http://www.monkey.org/~provos/libevent/ If it's already installed, specify its path using --with-libevent=/dir/ [root@localhost memcached-1.4.20]#
从上述的信息可以看到安装时候没有报之前的错误了,但是又报了一个缺少libevent的错误,没有办法,再去安装libevent
下载libevent
地址:https://sourceforge.net/projects/levent/files/libevent/libevent-2.0/libevent-2.0.22-stable.tar.gz
然后解压进入解压后的目录,执行如下命令进行安装:
./configure -prefix=/usr; make; make install;
测试是或安装libevent成功的命令如下:
ls -al /usr/lib | grep libevent
如果有输出,则说明安装完成。
然后进入memcached目录进行你要进行的安装步骤。
./configure --with-libevent=/usr;//路径为你之前安装libevent时安装的目录。 make; make install;
至于memcache有没有安装好,这里就不在验证了,毕竟这个只是一个解决错误的文章,还有我也是初学者,哈哈。
我觉得这篇文章写的很好,可以参考下:
http://www.cnblogs.com/zgx/archive/2011/08/10/2134097.html
相关推荐
linux下安装memcached以及解决安装中遇到的问题,配置连接,让memcached找到libevent库。
linux下安装memcached详细步骤,加安装包
在Linux上安装Memcached服务.doc
linux下memcached安装,不错的学习资源。
介绍Linux下memcached详细安装步骤,自己的实际安装经验。
linux安装memcached问题处理,可能有些乱,但是能看懂
linux环境下memcached安装, 配置,以及配合tomcat 实现 session 工享。
memcached安装,memcached,缓存安装,linux memcached安装
memcache扩展使php操作memcached服务器成为可能. 1.首先下载安装文件 () wget http://pecl.php.net/get/memcache-2.2.3.tgz 放在某个目录下,然后。。。
linux下memcached安装以及启动
包括最新的memcached,libevent,libmemcached以及memcache的php扩展
1. 里面有相关的安装包以及详细安装文档
Linux下memcached安装,安装前确保操作系统已经安装好gcc.测试方法:直接在终端输入:gcc.结果你会看得懂。
linux下编译安装memcached服务.pdf
文档描述了在linux下如何安装JDK,memcached、magent等软件的步骤。
在redhat5下测试过,可以使用的memcached,而且libmemcached也经过测试(c++版本的memcached api),还附赠一份代码
Linux通过源代码安装Memcached,并设置开机启动过程。
安装Memcached及Memcached配置
本包包括了Linux安装命令以及Memcached安装所有的jar包,另外附加客户端测试java代码所依赖的jar