我试图libmemcached-1.0.8
在 ubuntu lucid 中从源代码制作和安装。我尝试了这些步骤
sudo wget http://download.tangent.org/libmemcached-1.0.8.tar.gz
sudo ./configure -prefix=/usr
sudo make
make 命令导致了这个错误
In file included from memcached/assoc.c:14:
memcached/memcached.h:18:19: error: event.h: No such file or directory
In file included from memcached/assoc.c:14:
memcached/memcached.h:358: error: field ‘notify_event’ has incomplete type
memcached/memcached.h:380: error: field ‘event’ has incomplete type
make[1]: *** [memcached/memcached_memcached-assoc.o] Error 1
make[1]: Leaving directory `/usr/local/src/libmemcached-1.0.8'
make: *** [all] Error 2
我已经安装了 memcached 使用
sudo apt-get install memcached
我试图检查 memcached 在哪里,使用whereis memcached
..它显示
memcached: /usr/bin/memcached /etc/memcached.conf /usr/include/memcached /usr/share/memcached /usr/share/man/man1/memcached.1.gz
有人可以告诉我应该怎么做才能正确制作和安装这个库吗?
编辑:
根据@sarnold 的建议,我使用了
sudo apt-get install libevent-dev
进而
sudo ./configure --prefix=/usr
sudo make
sudo make install
现在,文件夹中有 13 个以“mem”开头的新可执行/usr/bin
文件