# Apache compile error...



## shaperbr (Sep 16, 2010)

Hello guys,

Me again...

I have another trouble...
When I try to compile apache I have this error..


```
dap -lgdbm -ldb-4.2 -lexpat -liconv /usr/local/lib/libapr-0.la -lm -lcrypt -pthread
/usr/local/share/apr/build-0/libtool --silent --mode=link cc  -g -pthread  -O2 -pipe -fno-strict-aliasing  -D_REENTRANT -D_THREAD_SAFE -
DAP_HAVE_DESIGNATED_INITIALIZER   -I/usr/local/include/apr-0 -I/usr/local/include -I/usr/local/include/db42 -I. -
I/usr/ports/www/apache20/work/httpd-2.0.63/os/unix -I/usr/ports/www/apache20/work/httpd-2.0.63/server/mpm/prefork -
I/usr/ports/www/apache20/work/httpd-2.0.63/modules/http -I/usr/ports/www/apache20/work/httpd-2.0.63/modules/filters -
I/usr/ports/www/apache20/work/httpd-2.0.63/modules/proxy -I/usr/ports/www/apache20/work/httpd-2.0.63/include -
I/usr/ports/www/apache20/work/httpd-2.0.63/modules/generators -I/usr/local/include/openssl -I/usr/ports/www/apache20/work/httpd-
2.0.63/modules/dav/main -export-dynamic -rpath=/usr/local/lib -L/usr/local/lib -L/usr/local/lib/db42  -rpath=/usr/local/lib -o htpasswd  
htpasswd.lo   -lz /usr/local/lib/libpcre.la   /usr/local/lib/libaprutil-0.la -lldap -lgdbm -ldb-4.2 -lexpat -liconv /usr/local/lib/libapr-0.la 
-lm -lcrypt -pthread
/usr/bin/ld: cannot find -lgdbm
*** Error code 1
/usr/bin/ld: cannot find -lgdbm
*** Error code 1
2 errors
*** Error code 1
1 error
*** Error code 1
1 error
*** Error code 1

Stop in /usr/ports/www/apache20.
```


----------



## sk8harddiefast (Sep 16, 2010)

Try 
	
	



```
pkg_add -r apache
```


----------



## DutchDaemon (Sep 16, 2010)

Make sure the port compiles with the default options first. Run [cmd=]make clean rmconfig install clean[/cmd] on the port, and leave the default options alone.


----------



## sk8harddiefast (Sep 16, 2010)

Also this may help: http://forums.freebsd.org/showthread.php?t=15759&highlight=compile


----------

