for install nginx with hello module(this module use #include )
i use yum -y install json-c json-c-devel before install nginx
make && make install is successful. but when i run nginx test
error message is show up :
nginx: [emerg] dlopen() "/etc/nginx/modules/ngx_http_hello_module.so" failed (/etc/nginx/modules/ngx_http_hello_module.so: undefined symbol: json_object_to_json_string) in /etc/nginx/nginx.conf:5
nginx: configuration file /etc/nginx/nginx.conf test failed
json-c library is not loadded! what can i do?
solve this problem ;)
method is : ./configure ... --with-ld-opt="-ljson"
after success install(make && make install), type ldd /usr/sbin/ngin then you will show loaded library file(.so)