LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   PHP 5 cannot find xml2-config for libxml2 support (http://www.linuxquestions.org/questions/linux-software-2/php-5-cannot-find-xml2-config-for-libxml2-support-168940/)

ridertech 04-11-2004 08:07 PM

PHP 5 cannot find xml2-config for libxml2 support
 
I'm a newbie trying to install PHP 5. I used apt to install libxml2, but when I try to configure PHP, it returns the following error...

checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
configure: error: xml2-config not found. Please check your libxml2 installation.

When I run locate libxml2, I can see the following...
/var/cache/apt/archives/libxml2-dev_2.4.19-4woody1_i386.deb
/var/cache/apt/archives/libxml2_2.4.19-4woody1_i386.deb
/var/lib/dpkg/info/libxml2.list
/var/lib/dpkg/info/libxml2.postrm

ridertech 04-12-2004 03:32 PM

If anyone else has the same problem, you can download a libxml2 from gnome.org, then just extract it as normal and reconfigure php...

ftp://ftp.ussg.iu.edu/pub/gnome/sources/libxml2/
More mirrors - http://ftp.gnome.org/pub/GNOME/MIRRORS.html

tar -zxvf libxml2-x.x.x.tar.gz
cd libxml2-x.x.x
./configure
make
make install

cd php-x.x.x
./configure (--help)

auhn 04-27-2004 10:55 PM

This Post was useful. I got the same problem with php-5.0.0RC2 on Debian SID. I just needed to download and install libxml2 with standard configuration: (./configure) and it worked !

Thanks !

samy22 05-28-2004 12:09 PM

Hi,
A simpler solution is to install a libxml2-devel rpm package.

breezewax 10-01-2004 11:03 PM

do i need to re-./configure php5 after i ./configure libxml2-devel ?

The Pentium Guy 11-06-2004 08:55 AM

Mine's not working unfortunately...

pentium:~/download/libxml2-2.6.5# ./configure
<ETC>
pentium:~/download/libxml2-2.6.5# make
-bash: make: command not found
pentium:~/download/libxml2-2.6.5# make test
-bash: make: command not found
pentium:~/download/libxml2-2.6.5# make install
-bash: make: command not found
pentium:~/download/libxml2-2.6.5#

bishal 11-09-2004 06:15 AM

libxml2 error
 
I got this error while doing installation of libxml2

./configure
make


elfgcchack.h:7518: warning: `visibility' attribute directive ignored
elfgcchack.h:7524: warning: `visibility' attribute directive ignored
gcc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -D_REENTRANT -g -O2 -pedantic -W -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -c parser.c -Wp,-MD,.deps/parser.TPlo -o parser.o >/dev/null 2>&1
source='tree.c' object='tree.lo' libtool=yes \
depfile='.deps/tree.Plo' tmpdepfile='.deps/tree.TPlo' \
depmode=gcc /bin/sh ./depcomp \
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -D_REENTRANT -g -O2 -pedantic -W -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -c -o tree.lo tree.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -D_REENTRANT -g -O2 -pedantic -W -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -c tree.c -Wp,-MD,.deps/tree.TPlo -fPIC -DPIC -o .libs/tree.o
In file included from libxml.h:57,
from tree.c:14:
elfgcchack.h:59: warning: `visibility' attribute directive ignored
elfgcchack.h:63: warning: `visibility' attribute directive ignored
elfgcchack.h:70: warning: `visibility' attribute directive ignored
elfgcchack.h:76: warning: `visibility' attribute directive ignored
elfgcchack.h:82: warning: `visibility' attribute directive ignored
elfgcchack.h:88: warning: `visibility' attribute directive ignored
elfgcchack.h:94: warning: `visibility' attribute directive ignored

dilberim82 02-27-2005 10:44 PM

Very useful thread... I give 10 out of 10. Sammy22, that was the first thing i did..to download the rpm and install it but that doesn't work. You have to get .tar.gz and install it i guess.... Thanks ridertech.

loren77 10-04-2005 07:52 AM

Try to install libxml2 developement packages.
With Debian:
apt-get install libxml2-dev

jaccon 10-05-2006 02:02 PM

Compile LibXML2-6-26
 
i get the package in http://developer.bluesystems.com.br and compile using Debian 4.0 and run ....

R960XT 03-03-2007 12:22 AM

Quote:

Originally Posted by ridertech
If anyone else has the same problem, you can download a libxml2 from gnome.org, then just extract it as normal and reconfigure php...

ftp://ftp.ussg.iu.edu/pub/gnome/sources/libxml2/
More mirrors - http://ftp.gnome.org/pub/GNOME/MIRRORS.html

i can open the link you gave. so i google around and found this

but thanks for this great thread, i encountered the same problem

microry 05-15-2007 03:31 AM

Solution
 
Hi there... with debian/ubuntu, simply install build-essential and libxml2-dev

Hope this helps...

ashnazg 07-13-2007 04:17 PM

yes, install libxml2-dev
 
"sudo apt-get install libxml2-dev" will fix this dependency issue on Debian/Ubuntu derivatives...

chenzhen_li 01-08-2008 09:27 PM

Exactly, the right answer.
 
Quote:

Originally Posted by microry (Post 2749335)
Hi there... with debian/ubuntu, simply install build-essential and libxml2-dev

Hope this helps...

Tank you very much, just that i need.
Very good place to know about linux.

gnikol1974 01-17-2009 09:57 AM

Ubuntu installation
 
Hi,
In ubuntu you should use the libxml2-devel bundle to be install, after that the configuraiton goes ok.

Thanks a lot
George


All times are GMT -5. The time now is 02:12 AM.