2

I am using following code to build apache.

apt-get install -y git \
openssl \
subversion \
autoconf \
libtool-bin \
libapr \
libapr-util \
make \
libpcre3-dev \
libpcre++-dev \
libxml2-dev \
libnghttp2-dev\
libexpat1-dev \
libxml2-dev \
python-pip \
python-virtualenv \
python


git clone https://github.com/apache/httpd.git

cd httpd

svn co http://svn.apache.org/repos/asf/apr/apr/trunk srclib/apr && cd srclib/apr && ./buildconf && ./configure && make && make install

Got the following error

checking Expat 1.0/1.1... no<br/>
  setting LDFLAGS to "-L/usr/local/lib"<br/>
  setting INCLUDES to "-I/usr/local/include"<br/>
checking Expat 1.95.x in /usr/local... no<br/>
  nulling LDFLAGS<br/>
  nulling INCLUDES<br/>
  setting APRUTIL_EXPORT_LIBS to ""<br/>
^[[91mconfigure: error: No XML parser found!  Please specify --with-expat or --with-libxml2<br/>

Can any help me in resolving the issue

2 Answers 2

0

You may download this library package:

apt-get download libexpat1-dev

Then unpack it:

ar x libexpat1-dev_version_.deb
tar xf data.tar.gz

Then find expat.h header files and copy them into /usr/include:

find . -name expat*.h -exec cp {} /usr/include/ \;

Then find libexpat.so and copy it into /usr/lib:

find . -name libexpat.so -exec cp {} /usr/lib/ \;

Then configure Apache

./configure

0

Make sure you have installed libxml2 installed else install it with

sudo apt-get install libxml2 libxml2-dev

And then before executing configure from source do as ./configure --with-libxml2=/usr/lib

Then execute this command

svn co http://svn.apache.org/repos/asf/apr/apr/trunk srclib/apr && cd srclib/apr && ./buildconf && ./configure && make && make install

Hope it helps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .