0

在编译 opensips 1.9 期间,我遇到了 memcached 错误。我已经 make 正确然后 make 和 make install 需要帮助。

请在进行安装时检查错误。Make install 输出粘贴在下面以供参考。

make[1]: Entering directory `/usr/local/src/opensips-1.9.0-tls/modules/cachedb_memcached'
make[1]: Leaving directory `/usr/local/src/opensips-1.9.0-tls/modules/cachedb_memcached'
make[1]: Entering directory `/usr/local/src/opensips-1.9.0-tls/modules/cachedb_memcached'
Compiling cachedb_memcached.c
In file included from cachedb_memcached.c:41:
cachedb_memcached.h:4:36: error: libmemcached/memcached.h: No such file or directory
In file included from cachedb_memcached.c:41:
cachedb_memcached.h:13: error: expected specifier-qualifier-list before ‘memcached_st’
cachedb_memcached.c:57: error: expected specifier-qualifier-list before ‘memcached_st’
cachedb_memcached.c: In function ‘wrap_memcached_insert’:
cachedb_memcached.c:97: error: ‘memcached_return’ undeclared (first use in this function)
cachedb_memcached.c:97: error: (Each undeclared identifier is reported only once
cachedb_memcached.c:97: error: for each function it appears in.)
cachedb_memcached.c:97: error: expected ‘;’ before ‘rc’
cachedb_memcached.c:102: error: ‘rc’ undeclared (first use in this function)
cachedb_memcached.c:102: warning: implicit declaration of function ‘memcached_set’
cachedb_memcached.c:102: error: ‘memcached_con’ has no member named ‘memc’
cachedb_memcached.c:105: error: ‘MEMCACHED_SUCCESS’ undeclared (first use in this function)
cachedb_memcached.c:107: warning: implicit declaration of function ‘memcached_strerror’
cachedb_memcached.c:107: error: ‘memcached_con’ has no member named ‘memc’
cachedb_memcached.c:107: error: ‘memcached_con’ has no member named ‘memc’
cachedb_memcached.c: In function ‘wrap_memcached_remove’:
cachedb_memcached.c:116: error: ‘memcached_return’ undeclared (first use in this function)
cachedb_memcached.c:116: error: expected ‘;’ before ‘rc’
cachedb_memcached.c:121: error: ‘rc’ undeclared (first use in this function)
cachedb_memcached.c:121: warning: implicit declaration of function ‘memcached_delete’
cachedb_memcached.c:121: error: ‘memcached_con’ has no member named ‘memc’
cachedb_memcached.c:123: error: ‘MEMCACHED_SUCCESS’ undeclared (first use in this function)
cachedb_memcached.c:123: error: ‘MEMCACHED_NOTFOUND’ undeclared (first use in this function)
cachedb_memcached.c:125: error: ‘memcached_con’ has no member named ‘memc’
cachedb_memcached.c:125: error: ‘memcached_con’ has no member named ‘memc’
cachedb_memcached.c: In function ‘wrap_memcached_get’:
cachedb_memcached.c:134: error: ‘memcached_return’ undeclared (first use in this function)
cachedb_memcached.c:134: error: expected ‘;’ before ‘rc’
cachedb_memcached.c:144: warning: implicit declaration of function ‘memcached_get’
cachedb_memcached.c:144: error: ‘memcached_con’ has no member named ‘memc’
cachedb_memcached.c:145: error: ‘rc’ undeclared (first use in this function)
cachedb_memcached.c:149: error: ‘MEMCACHED_NOTFOUND’ undeclared (first use in this function)
cachedb_memcached.c:157: error: ‘memcached_con’ has no member named ‘memc’
cachedb_memcached.c: In function ‘wrap_memcached_add’:
cachedb_memcached.c:183: error: ‘memcached_return’ undeclared (first use in this function)
cachedb_memcached.c:183: error: expected ‘;’ before ‘rc’
cachedb_memcached.c:190: error: ‘rc’ undeclared (first use in this function)
cachedb_memcached.c:190: warning: implicit declaration of function ‘memcached_increment’
cachedb_memcached.c:190: error: ‘memcached_con’ has no member named ‘memc’
cachedb_memcached.c:192: error: ‘MEMCACHED_SUCCESS’ undeclared (first use in this function)
cachedb_memcached.c:193: error: ‘MEMCACHED_NOTFOUND’ undeclared (first use in this function)
cachedb_memcached.c:204: error: ‘memcached_con’ has no member named ‘memc’
cachedb_memcached.c:204: error: ‘memcached_con’ has no member named ‘memc’
cachedb_memcached.c: In function ‘wrap_memcached_sub’:
cachedb_memcached.c:219: error: ‘memcached_return’ undeclared (first use in this function)
cachedb_memcached.c:219: error: expected ‘;’ before ‘rc’
cachedb_memcached.c:226: error: ‘rc’ undeclared (first use in this function)
cachedb_memcached.c:226: warning: implicit declaration of function ‘memcached_decrement’
cachedb_memcached.c:226: error: ‘memcached_con’ has no member named ‘memc’
cachedb_memcached.c:228: error: ‘MEMCACHED_SUCCESS’ undeclared (first use in this function)
cachedb_memcached.c:229: error: ‘MEMCACHED_NOTFOUND’ undeclared (first use in this function)
cachedb_memcached.c:240: error: ‘memcached_con’ has no member named ‘memc’
cachedb_memcached.c:240: error: ‘memcached_con’ has no member named ‘memc’
cachedb_memcached.c: In function ‘memcached_new_connection’:
cachedb_memcached.c:262: error: ‘memcached_server_st’ undeclared (first use in this function)
cachedb_memcached.c:262: error: ‘server_list’ undeclared (first use in this function)
cachedb_memcached.c:263: error: ‘memcached_return’ undeclared (first use in this function)
cachedb_memcached.c:263: error: expected ‘;’ before ‘rc’
cachedb_memcached.c:283: error: ‘memcached_con’ has no member named ‘memc’
cachedb_memcached.c:283: warning: implicit declaration of function ‘memcached_create’
cachedb_memcached.c:299: warning: implicit declaration of function ‘memcached_servers_parse’
cachedb_memcached.c:300: error: ‘rc’ undeclared (first use in this function)
cachedb_memcached.c:300: warning: implicit declaration of function ‘memcached_server_push’
cachedb_memcached.c:300: error: ‘memcached_con’ has no member named ‘memc’
cachedb_memcached.c:302: error: ‘MEMCACHED_SUCCESS’ undeclared (first use in this function)
cachedb_memcached.c:303: error: ‘memcached_con’ has no member named ‘memc’
cachedb_memcached.c:303: error: ‘memcached_con’ has no member named ‘memc’
cachedb_memcached.c:309: warning: implicit declaration of function ‘memcached_behavior_set’
cachedb_memcached.c:309: error: ‘memcached_con’ has no member named ‘memc’
cachedb_memcached.c:310: error: ‘MEMCACHED_BEHAVIOR_NO_BLOCK’ undeclared (first use in this function)
cachedb_memcached.c:313: error: ‘memcached_con’ has no member named ‘memc’
cachedb_memcached.c:313: error: ‘memcached_con’ has no member named ‘memc’
cachedb_memcached.c: In function ‘memcached_free_connection’:
cachedb_memcached.c:334: warning: implicit declaration of function ‘memcached_free’
cachedb_memcached.c:334: error: ‘memcached_con’ has no member named ‘memc’
make[1]: *** [cachedb_memcached.o] Error 1
make[1]: Leaving directory `/usr/local/src/opensips-1.9.0-tls/modules/cachedb_memcached'
make: *** [modules] Error 2
4

1 回答 1

3

根据 opensips 模块文档,您的 redhat 上似乎缺少 libmemcached。以下是在编译 opensips 之前安装 libmemcached 的简短说明:

wget http://download.tangent.org/libmemcached-0.31.tar.gz 
tar -xzvf libmemcached-0.31.tar.gz
cd libmemcached-0.31
./configure
make
sudo make install
于 2015-09-18T12:05:29.393 回答