LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-20-2007, 09:17 AM   #1
SpinningCone
LQ Newbie
 
Registered: Jul 2006
Posts: 19

Rep: Reputation: 0
problem installing PHP 5 xml2-config not found


Hi, im trying to get apache server with php 5.2.1 up and running on debian sarge
i got apache installed and am trying to get php to configure but it gets to configuring extensions and gets this error:

checking for xml2-config path...
configure: error: xml2-config not found. Please check your libxml2 installation.

i installed libxml from libxml2-2.6.27.tar into /apps/libxml2-2.6.27 and used the following in my configuration --with-libxml-dir=/apps/libxml2-2.6.27

why is it not finding my config?

is there another tar im missing it seems the typical solution to this problem is solved using apt-get and installing the devel package except on this box i dont have access to apt-get and don't have the root access to install a package manually i can only use tarballs
 
Old 02-20-2007, 09:39 AM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
It's looking for the xml2-config file which should be installed in the bin directory of the libxml2 prefix. Typically, this would be /usr/local/bin or /usr/bin. In your case it would be in /apps/libxml2-2.6.27/bin.

xml2-config determines the compile and linker flags that should be used to compile and link programs that use libxml2. That being the case, it is probably part of the libxml2 development package rather than the runtime package you installed. Look for and install a package libxml2-dev or libxml2-devel. After you install the development files, try the PHP install again.
 
Old 02-20-2007, 10:01 AM   #3
SpinningCone
LQ Newbie
 
Registered: Jul 2006
Posts: 19

Original Poster
Rep: Reputation: 0
there doesn't seem to be a /bin under /apps/libxml2-2.6.27/ however there is an xml2-config file in that directory thats why i'm confused why it cant find it

as i mentioned befor i cannot install packages on this machine i can only use tar files. adn there dosent appear to be a libxml2-2.6.27-devel.tar file on the main site.
 
Old 02-20-2007, 10:44 AM   #4
SpinningCone
LQ Newbie
 
Registered: Jul 2006
Posts: 19

Original Poster
Rep: Reputation: 0
figured it out . the configure file looks in prefix/bin/ for the xml2-config

for some reason when i made libxml it didn't create a /bin/ after editing the php it finds that file.
 
Old 02-20-2007, 11:02 AM   #5
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
Sorry, didn't read that last paragraph closely enough. If you're using tarballs, then your getting everything that would be in the development package. Now I have to download the PHP tarball and read the configure script...

Here's the applicable section from the configure script
Code:
for i in $PHP_LIBXML_DIR /usr/local /usr; do
    if test -x "$i/bin/xml2-config"; then
      ac_cv_php_xml2_config_path="$i/bin/xml2-config"
You can see that the script looks in the bin subdirectory of the user supplied libxml2 prefix, then /usr/local, then /usr for xml2-config. Since you don't have a bin subdirectory, it can't find xml2-config.

There's two things you could do at this point. Either create /apps/libxml2-2.6.27/bin and move xml2-config there or edit the PHP configure script to NOT look in the bin subdirectory. This sed will edit the configure script
Code:
sed -i 's@/bin/xml2-config@/xml2-config@g' configure
Edit: Which you figured out while I was writing this post.

Last edited by weibullguy; 02-20-2007 at 11:18 AM.
 
Old 02-21-2007, 07:06 AM   #6
SpinningCone
LQ Newbie
 
Registered: Jul 2006
Posts: 19

Original Poster
Rep: Reputation: 0
yep got it just as you were writing thanks for the info though, your explination was much more detailed and may help someone else who might be in the same boat.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP 5 cannot find xml2-config for libxml2 support ridertech Linux - Software 21 02-08-2013 09:00 PM
xml2-config not found, can't install php snip128 Linux - Newbie 12 09-29-2011 03:32 PM
PHP5 xml2-config bcf2 Linux - Software 1 07-03-2005 10:45 AM
pkg-config problem, gaim.pc not found ncharoe Linux - Software 1 01-12-2005 01:20 PM
./configure cant find xml2-config (neither can I) unholy Linux - Software 10 10-26-2003 12:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration