2015-10-02 48 views
0

我在安装opensips时遇到了错误。在RedHat上安装opensips cachedb_redis时出现错误

请帮我解决这个问题。我已经安装了Redis和freeradius。

make[1]: Entering directory `/usr/local/src/opensips-1.9.0-tls/modules/aaa_radius' 
make[1]: Leaving directory `/usr/local/src/opensips-1.9.0-tls/modules/aaa_radius' 
make[1]: Entering directory `/usr/local/src/opensips-1.9.0-tls/modules/aaa_radius' 
Compiling aaa_radius.c 
Compiling rad.c 
Linking aaa_radius.so 
make[1]: Leaving directory `/usr/local/src/opensips-1.9.0-tls/modules/aaa_radius' 


make[1]: Entering directory `/usr/local/src/opensips-1.9.0-tls/modules/cachedb_redis' 
make[1]: Leaving directory `/usr/local/src/opensips-1.9.0-tls/modules/cachedb_redis' 
make[1]: Entering directory `/usr/local/src/opensips-1.9.0-tls/modules/cachedb_redis' 
Compiling cachedb_redis.c 
In file included from cachedb_redis.c:41: 
cachedb_redis_dbase.h:29:29: error: hiredis/hiredis.h: No such file or directory 
In file included from cachedb_redis.c:41: 
cachedb_redis_dbase.h:38: error: expected specifier-qualifier-list before ‘redisContext’ 
make[1]: *** [cachedb_redis.o] Error 1 
make[1]: Leaving directory `/usr/local/src/opensips-1.9.0-tls/modules/cachedb_redis' 
make: *** [modules] Error 2 

回答

1

我100%的信心Redis的开发包可以在epel库(/etc/yum.repos.d/epel.repo)发现:

yum install hiredis-devel.x86_64

现在,如果你真的想安装红帽只包,你应该尝试从/etc/yum.repos.d/redhat.repo开启尽可能多的存储库,直到您希望找到好的存储库为止!

+0

我没有红帽注册这就是为什么我使用epel – FAK

+0

那么你应该很好! –

+0

你能把这个标记为“选择的答案”吗?也许它会在未来帮助其他用户 –

0

该问题已通过安装hiredis-devel.x86_64解决。

但现在我有这个错误。

make[1]: Entering directory `/usr/local/src/opensips-1.9.0-tls/modules/json' 
Compiling array_del.c 
array_del.c:29:23: error: json/json.h: No such file or directory 
array_del.c:30:38: error: json/json_object_private.h: No such file or directory 
array_del.c:32: warning: ‘struct array_list’ declared inside parameter list 
array_del.c:32: warning: its scope is only this definition or declaration, which is probably not what you want 
array_del.c: In function ‘array_list_del_idx’: 
array_del.c:36: error: dereferencing pointer to incomplete type 
array_del.c:40: error: dereferencing pointer to incomplete type 
array_del.c:40: error: dereferencing pointer to incomplete type 
array_del.c:41: error: dereferencing pointer to incomplete type 
array_del.c:43: error: dereferencing pointer to incomplete type 
array_del.c:44: error: dereferencing pointer to incomplete type 
array_del.c:44: error: dereferencing pointer to incomplete type 
array_del.c: At top level: 
array_del.c:47: warning: ‘struct json_object’ declared inside parameter list 
array_del.c: In function ‘json_object_array_del’: 
array_del.c:49: error: dereferencing pointer to incomplete type 
make[1]: *** [array_del.o] Error 1 
make[1]: Leaving directory `/usr/local/src/opensips-1.9.0-tls/modules/json' 
make: *** [modules] Error 2 
+0

'yum install json-c-devel' –