我想編譯apache 2.4.6。我已經成功編譯並安裝了最新的apr(1.4.x)和apr-util(1.5.x)。apache 2.4.6,與模塊apr掛鉤錯誤
這裏是我的環境設置,編譯設置和修改每個包後LD_LIBRARY_PATH:
ENVPREFIX=/auto/custom-libs/linux/centos/6.x/x86_64/pkgs/httpd-2.4.6/
INSTALLPREFIX=${ENVPREFIX}
export PATH=${INSTALLPREFIX}/bin:$PATH
# APR compilation settings
./configure --prefix=${INSTALLPREFIX} --enable-other-child --enable-allocator-uses-mmap --enable-threads
make -j16
make install
export LD_LIBRARY_PATH=${INSTALLPREFIX}/lib:$LD_LIBRARY_PATH
# APR-util compilation settings
./configure --prefix=${INSTALLPREFIX} --with-apr=${ENVPREFIX}/bin/apr-1-config --with-mysql=/usr/bin/mysql --with-crypto --with-ldap-lib=${ENVPREFIX}/lib --with-ldap-include=${ENVPREFIX}/include --with-openssl=/usr/lib64/openssl
make -j16
make install
export LD_LIBRARY_PATH=${INSTALLPREFIX}/lib/apr-util-1/:$LD_LIBRARY_PATH
# Apache httpd compilation parameters
./configure --prefix=${INSTALLPREFIX} --enable-mpms-shared='all' --enable-rewrite --enable-ssl --enable-proxy --enable-cache --enable-pie --enable-mods-shared='all' --enable-ssl-staticlib-deps --enable-session --enable-proxy-balancer --enable-usertrack --with-apr=${ENVPREFIX}/bin --with-apr-util=${ENVPREFIX}/bin
make -j16
make install
export LD_LIBRARY_PATH=${INSTALLPREFIX}/lib/modules/:$LD_LIBRARY_PATH
一切都很好,直到我開始香草網站。所有我改變的是一個非標準的8000端口和用戶名。不幸的是,我遇到了以下錯誤,它暗示了某些版本與最新的apache 2.4.6代碼附帶的模塊不兼容。
命令:
httpd -f `pwd`/httpd.conf
錯誤輸出:
httpd: Syntax error on line 137 of /home/prigor/codebase/pediatrics/webservices/pedws/pedws/apache/httpd.conf: Cannot load modules/mod_session_cookie.so into server: /auto/igb-libs/linux/centos/6.x/x86_64/pkgs/httpd-2.4.6/modules/mod_session_cookie.so: undefined symbol: ap_hook_session_save
即使禁用該模塊後,相同的錯誤與剩餘的模塊繼續存在。也許我使用的是apr和apr-util的不正確版本?也許我在某處設置了錯誤的配置開關?
在此先感謝您的幫助!