RiseCakoPlusplus
RiseCakoPlusplus

Reputation: 3

Compile Apache 2.4.3 on Centos 6.2 (64bit)

I attempt to compile Apache 2.4.3 with apr-1.4.6 and apr-util-1.5.1 on Centos 6.2 (64bit).

./configure --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-libdir=lib64 --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --disable-debug --with-pic --disable-rpath --without-pear --with-bz2 --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr --enable-gd-native-ttf --with-t1lib=/usr --without-gdbm --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-zlib --with-layout=GNU --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --with-kerberos --enable-ucd-snmp-hack --enable-shmop --enable-calendar --with-libxml-dir=/usr --enable-xml --with-system-tzdata --with-mhash --with-apxs2=/usr/sbin/apxs --libdir=/usr/lib64/php --enable-pdo=shared --with-mysql=shared,/usr --with-mysqli=shared,/usr/lib64/mysql/mysql_config --with-pdo-mysql=shared,/usr/lib64/mysql/mysql_config --without-pdo-sqlite --without-gd --disable-dom --disable-dba --without-unixODBC --disable-xmlreader --disable-xmlwriter --without-sqlite3 --disable-phar --disable-fileinfo --disable-json --without-pspell --disable-wddx --without-curl --disable-posix --disable-sysvmsg --disable-sysvshm --disable-sysvsem ./configure --with-included-apr --with-included-apr-util

and when I issue make this happen:

/root/httpd-2.4.3/srclib/apr/libtool: line 5989: cd: yes/lib: No such file or directory libtool: link: cannot determine absolute directory name of yes/lib' make[3]: *** [libaprutil-1.la] Error 1 make[3]: Leaving directory/root/httpd-2.4.3/srclib/apr-util' make[2]: * [all-recursive] Error 1 make[2]: Leaving directory /root/httpd-2.4.3/srclib/apr-util' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/root/httpd-2.4.3/srclib' make: * [all-recursive] Error 1

anything I missed?

Upvotes: 0

Views: 13308

Answers (2)

steve98177
steve98177

Reputation: 2131

The above got me to the point where I was able to install apache 2.4.3. Unfortunately for me, and maybe you too, I saw this when doing apachectl -k start:

httpd: Syntax error on line 141 of /home/netman1/sp/usr/local/apache/conf/httpd.conf: Cannot load modules/mod_dir.so into server: home/netman1/sp/usr/local/apache/modules/mod_dir.so: undefined symbol: apr_array_clear

I did this, and found a stale links pointing to an older version of libapr-1.so.

ldd httpd | grep apr libaprutil-1.so.0 => /home/netman1/usr/local/apache/apr/lib/libaprutil-1.so.0 (0x00002aba9dccb000) libapr-1.so.0 => /usr/lib64/libapr-1.so.0 (0x00002aba9defd000)

To fix this mess, I saved off the old link, and then created a new link pointing to the correct version:

fixed: libapr-1.so.0 -> /opt/app/p3smk1c1/usr/local/apache/apr/lib/libapr-1.so.0.4.6
broken: libapr-1.so.0 -> libapr-1.so.0.2.7

Now, I can start apache, and at least it does not complain about an 'undefined symbol: apr_array_clear'... Hope this helps you.

Upvotes: 0

ray_linn
ray_linn

Reputation: 1392

Please do as following:

# Build and install apr 1.2
 cd srclib/apr
 ./configure --prefix=/usr/local/apr-httpd/
 make
 make install

 # Build and install apr-util 1.2
 cd ../apr-util
 ./configure --prefix=/usr/local/apr-util-httpd/ --with-apr=/usr/local/apr-httpd/
 make
 make install

 # Configure httpd
 cd ../../
 ./configure --with-apr=/usr/local/apr-httpd/ --with-apr-util=/usr/local/apr-util-httpd/ 

Upvotes: 2

Related Questions