LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-20-2010, 12:55 AM   #1
linuxengineer
LQ Newbie
 
Registered: Nov 2010
Posts: 12

Rep: Reputation: 0
Unhappy PHP installation problem on Centos server


I tried to install php from source file on centos server and i got the error as


# ./configure --with-apxs2=/usr/local/packages/apache/bin/apxs --with-mysql --prefix=/usr/local/packages/apache/php --enable-force-cgi-redirect --disable-cgi --with-zlib --with-gettext --with-gdbm
.
.
.
.
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... /var/lib/mysql/mysql.sock
checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no
configure: error: mysql configure failed. Please check config.log for more information.

How it can be solved ?
 
Old 11-20-2010, 01:02 AM   #2
linuxengineer
LQ Newbie
 
Registered: Nov 2010
Posts: 12

Original Poster
Rep: Reputation: 0
Unhappy

config.log gives error as

configure:59864: checking for specified location of the MySQL UNIX socket
configure:59922: checking for MySQL UNIX socket location
configure:60113: checking for mysql_close in -lmysqlclient
configure:60132: gcc -o conftest -I/usr/include -g -O2 -Wl,-rpath,/usr/lib/mysql -L/usr/lib/mysql -L/usr/lib conftest.c -lmysqlclient -lgdbm -lz -lrt -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm 1>&5
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
configure: failed program was:
#line 60121 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char mysql_close();

int main() {
mysql_close()
; return 0; }
configure:60355: checking for mysql_error in -lmysqlclient
configure:60374: gcc -o conftest -I/usr/include -g -O2 -Wl,-rpath,/usr/lib/mysql -L/usr/lib/mysql -L/usr/lib -Wl,-rpath,/usr -L/usr conftest.c -lmysqlclient -lz -lgdbm -lz -lrt -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm 1>&5
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
configure: failed program was:
#line 60363 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char mysql_error();

int main() {
mysql_error()
; return 0; }
 
Old 11-20-2010, 01:32 AM   #3
linuxengineer
LQ Newbie
 
Registered: Nov 2010
Posts: 12

Original Poster
Rep: Reputation: 0
Smile

solved it myself...........thanks for all who have looked upon this
 
Old 01-14-2011, 12:34 PM   #4
rem2500
LQ Newbie
 
Registered: Jan 2011
Posts: 1

Rep: Reputation: 0
Hi. I am seeing the same issue. How did you fix this?

Thanks
Ben
 
Old 01-28-2011, 11:32 AM   #5
kosterbang
LQ Newbie
 
Registered: Jan 2010
Posts: 4

Rep: Reputation: 0
Unhappy Great, you solved it. Um .... how?

If you had simply solved it and not gotten back to the site to report, I'd understand. But the fact that you came back, made the entry that you'd solved it and still didn't tell us how ... that's weird. I suppose you think this was just something stupid YOU did, so no one would care about the solution. And hey, maybe it is. But MY stupid error looks exactly like yours, and I'd really love some help. I have a clean system install, followed all the given directions and am hitting this wall.

And by the way, I don't mean to be so pissy at YOU. This is the zillionth time some basic linux thing has failed on me because I didn't know to do "WXYZ" somewhere. I have used linux for years, have a lot of system experience, and still, every time I try to do ANYTHING there's just this special stuff to hack through. I don't know how linux survives this, I really don't.
 
Old 01-28-2011, 12:28 PM   #6
kosterbang
LQ Newbie
 
Registered: Jan 2010
Posts: 4

Rep: Reputation: 0
not fixed yet but I figured I owed a followup

Ok, so, having flamed whoeveritwas above I figured I owed a followup. I don't think I had the mysql-client installed right. When I tried to install, it said it was already there, but .... who believes that?

I went into the menu Applictions/add-remove software and searched for and removed all mysql-5.0.77 stuff (which is the version my system SAID was installed). Then I went to mysql.com and downloaded (yeah, ok, I did this part ALREADY ... that's what I couldn't get to work, BTW it's the x86_64 version of, in case anyone cares) client and server packages:
MySQL-client-5.5.8-1.linux2.6.x86_64.rpm
MySQL-server-5.5.8-1.linux2.6.x86_64.rpm
Rather than yelling at me that it was already installed, I got a lot of successful looking stuff from the server part, and a vaguely encouraging nothing for the client install (aligned with the general unix practice that no news is good news).

Returning to the PHP ./configure thing, I get a DIFFERENT error, so now I have to search for someone new to flame, I mean, ... help with that.

TTFN
:-*
 
Old 01-28-2011, 01:35 PM   #7
kosterbang
LQ Newbie
 
Registered: Jan 2010
Posts: 4

Rep: Reputation: 0
Smile solved, as far as it goes

OK, so. After all the blathering, I figured I should post how I actually succeeded, in case anyone is reading. By the way, the task I'm trying to do is run ./configure in my newly unpacked php directory. By the way, the configure command that eventually did it for me was
./configure \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-mysql=/usr/local/mysql/mysql-5.5.8-linux2.6-x86_64 \
--with-zlib-dir=/usr/local/zlib-1.2.5
and I'm on CentOS 5.4 with PHP 5.3.5 and httpd 2.2.17.

and in case you haven't traipsed through all the other parts of this, the fresh apache installation plunked itself into /usr/local/apache2, and the fresh zlib stuff (from zlib.com I think) I unpacked into ... well, you see it above. (And by the way, zlib required the ususal ./configure, make, make install). The new thing is that .... it turns out that the tar file you need at mysql.com is the LAST one in the list. The word "bundle" in some blog triggered me to look and realize that the "mysql-server" etc. stuff at the beginning of the download page ... those are just pieces of the big puzzle.

So, I downloaded the 156MB (approx?) mysql-5.5.8-linux2.6-x86_64.tar.gz and unpacked it to address above in the 2nd "with" line, and there you go. Mind you, I already had the server and client pieces installed (and perhaps running) by this point. So all it needed was access to the headers files .so and on it went, down to the license box at the end.

Then "make" ran for ever (lots of happy compiling) and then "make test" had just a couple of glitches which didn't seem to bother it too much. "make install" seems happy too. OK, that's all I have.

Barry

Now let's see, what was I trying to do three days ago when this started .....
 
  


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
trouble trying to access mssql server from centos using freetds, unixodbc and php wasamzy Linux - Server 2 07-27-2021 09:54 AM
Problem with connect to Remote Sql Server 2000 from centos 4.5 with PHP rufat Linux - Software 12 02-08-2010 07:54 AM
Centos 5.0, php-5.2.8 installation, chmod 755 /usr/local/apache2/modules/libphp5.so xxx_anuj_xxx Linux - Server 1 12-30-2008 01:37 PM
Centos 5.0, php-5.2.8 installation, chmod 755 /usr/local/apache2/modules/libphp5.so xxx_anuj_xxx Linux - Server 0 12-30-2008 11:37 AM
Zimbra server installation on CentOS 5 raghuram1980 Linux - Newbie 1 12-18-2008 11:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:34 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