我在安装opensips时遇到错误。
请帮我解决这个问题。我已经安装了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
答案 0 :(得分:1)
我100%有信心可以在epel
存储库(/etc/yum.repos.d/epel.repo
)中找到redis开发包:
yum install hiredis-devel.x86_64
现在,如果您真的想要安装仅限Red Hat的软件包,那么您应该尝试从/etc/yum.repos.d/redhat.repo
启用尽可能多的存储库,直到您希望找到一个好的软件包!
答案 1 :(得分: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