Here are some potential tips to solve problems with installing packages in CentOS (5.3)

To solve an error about mysql.h not found when configuring php --with-mysql had to do yum install mysql-devel

to solve this: # /usr/local/apache/bin/apachectl configtest httpd: Syntax error on line 53 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/modules/ into server: /usr/local/apache/modules/ cannot restore segment prot after reloc: Permission denied

had to do this: chcon -t texrel_shlib_t /usr/local/apache/modules/;wap2

to solve this: /usr/lib/apr/build/libtool --mode=install cp /usr/lib/httpd/modules/ libtool: install: error: cannot install `' to a directory not ending in /root/php5/php-5.1.2/libs apxs:Error: Command failed with rc=65536

had to do this: pico libtool ; search for these lines:

if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not$ exit $EXIT_FAILURE fi

Comment them out by adding # in front of them.