kvspb / nginx-auth-ldap

LDAP authentication module for nginx
BSD 2-Clause "Simplified" License
735 stars 252 forks source link

ngx_http_auth_ldap_module.c:33:18: fatal error: ldap.h: No such file or directory #156

Closed nixmomo closed 7 years ago

nixmomo commented 7 years ago

compile error at debian... he miss a ldap.h file... where i can get it? ` -o objs/addon/nginx-auth-ldap/ngx_http_auth_ldap_module.o \ /home/nginx-addons/nginx-auth-ldap//ngx_http_auth_ldap_module.c /home/nginx-addons/nginx-auth-ldap//ngx_http_auth_ldap_module.c:33:18: fatal error: ldap.h: No such file or directory

include

              ^

compilation terminated. objs/Makefile:1645: recipe for target 'objs/addon/nginx-auth-ldap/ngx_http_auth_ldap_module.o' failed make[2]: [objs/addon/nginx-auth-ldap/ngx_http_auth_ldap_module.o] Error 1 make[2]: Leaving directory '/root/nginx-1.10.2/debian/build-nginx' Makefile:8: recipe for target 'build' failed make[1]: [build] Error 2 make[1]: Leaving directory '/root/nginx-1.10.2/debian/build-nginx'

`

prakashsingh08 commented 7 years ago

@nixmomo did you get any solution to resolve this? why you closed this issue?

alexeikaratai commented 7 years ago

@nixmomo how do you fix it?

nixmomo commented 7 years ago

I installed libldap2-dev and openldap on the server where I build my nginx deb files. If you don't resolve it with installing dependencies i can build a deb package if you use Debian or ubuntu

KeithTt commented 7 years ago

Good work, thanks a lot !

I installed openldap-devel and resolved this problem.

# yum install -y openldap-devel
KeithTt commented 7 years ago

Unfortunately, I meet a another error in debian7:

src/os/unix/ngx_files.c: In function ‘ngx_write_chain_to_file’:
src/os/unix/ngx_files.c:294:34: error: ‘IOV_MAX’ undeclared (first use in this function)
src/os/unix/ngx_files.c:294:34: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [objs/src/os/unix/ngx_files.o] Error 1
make[1]: Leaving directory `/usr/local/src/tengine-2.2.0'

I have installed libevent-dev, but didn't work.

shengdin commented 4 years ago

i have a problem for compiling in windows env 。please help me cl -c -O2 -W4 -nologo -MT -Zi -Fdobjs/nginx.pdb -DFD_SETSIZE=1024 -DNO_SYS_TYPES_H -Yungx_config.h -Fpobjs/ngx_config.pch -I src/core -I src/event -I src/event/modules -I src/os/win32 -I objs/lib/pcre-8.43 -I objs/lib/openssl-1.1.1c/openssl/include -I objs/lib/zlib-1.2.11 -I objs -I src/http -I src/http/modules -Foobjs/addon/nginx-auth-ldap/ngx_http_auth_ldap_module.obj objs/lib/nginx-auth-ldap/ngx_http_auth_ldap_module.c ngx_http_auth_ldap_module.c objs/lib/nginx-auth-ldap/ngx_http_auth_ldap_module.c(1004): error C2065: 'SHUT_RDWR': undeclared identifier i already put lber.h,ldap.h,ldap_cdefs.h,ldap_features.h,lber_types.h in my compile path

gondaz commented 3 years ago

For builds on Ubuntu need to be installed the following LDAP related packages: # apt install libldap2-dev ldap-utils