# Apache package doesn't include mod_authnz_ldap.so



## stefanlasiewski (Jul 10, 2012)

I recently installed the apache-2.2.21 package on my FreeBSD 9.0-RELEASE system (e.g.): 
	
	



```
export PACKAGESITE=ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest && pkg_add -r apache22
```

Now, Apache won't start because it appears that mod_authnz_ldap.so is not included by default with the FreeBSD package.



```
# /usr/local/etc/rc.d/apache22 start
Performing sanity check on apache22 configuration:
httpd: Syntax error on line 38 of /usr/local/etc/apache22/httpd.conf: Cannot load /usr/local/libexec/apache22/mod_authnz_ldap.so into server: Cannot open "/usr/local/libexec/apache22/mod_authnz_ldap.so"
Starting apache22.
/usr/local/etc/rc.d/apache22: WARNING: failed to start apache22
```

I would prefer to use a prebuilt FreeBSD package for this because building it from ports is going to take time and resources which I don't have. Is it possible to obtain a version of Apache22 which includes the mod_authnz_ldap module, or do I have no choice but to build it on my own?

-= Stefan


----------



## SirDice (Jul 11, 2012)

If you want anything other than the default options you'll have to build it from ports.

Building Apache shouldn't take long though.


----------



## stefanlasiewski (Jul 11, 2012)

Thank you SirDice.



> Building Apache shouldn't take long though.



Hopefully not. But I was using packages before, and now I need to build from ports.

What is the best way to transition from a FreeBSD package to a FreeBSD port when ports have never been used on the machine? It seems that I need to download a fresh version of /usr/ports , and build apache22 and it's dependencies out of ports. But it seems like there could be dependency problems if other installed packages are out of sync with the ports available in /usr/ports/ . Apache has a lot of dependencies, so now I need to make my way through dependency hell. 


```
freebsd9# cd /usr/ports/www/apache22
freebsd9# make all-depends-list
/usr/ports/lang/perl5.14
/usr/ports/devel/autoconf
/usr/ports/devel/libtool
/usr/ports/textproc/expat2
/usr/ports/devel/apr1
/usr/ports/devel/pcre
/usr/ports/net/openldap24-client
/usr/ports/converters/libiconv
/usr/ports/devel/m4
/usr/ports/misc/help2man
/usr/ports/devel/gmake
/usr/ports/devel/autoconf-wrapper
/usr/ports/lang/python27
/usr/ports/devel/automake
/usr/ports/databases/gdbm
/usr/ports/databases/db42
/usr/ports/devel/p5-Locale-gettext
/usr/ports/devel/gettext
/usr/ports/devel/automake-wrapper
```


----------



## SirDice (Jul 12, 2012)

stefanlasiewski said:
			
		

> What is the best way to transition from a FreeBSD package to a FreeBSD port when ports have never been used on the machine?


Just use them. Packages are nothing more than pre-compiled ports. There is no difference between them.



> But it seems like there could be dependency problems if other installed packages are out of sync with the ports available in /usr/ports/ . Apache has a lot of dependencies, so now I need to make my way through dependency hell.


Use ports-mgmt/portmaster or ports-mgmt/portupgrade. It will make live a lot easier. Both will take care of the dependencies for you.

One thing you do need to keep an eye on is /usr/ports/UPDATING. Sometimes ports need to be upgraded in a specific order. UPDATING will tell you want to do.


----------

