Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-20-2010, 12:55 AM
|
#1
|
LQ Newbie
Registered: Nov 2010
Posts: 12
Rep:
|
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 ?
|
|
|
11-20-2010, 01:02 AM
|
#2
|
LQ Newbie
Registered: Nov 2010
Posts: 12
Original Poster
Rep:
|
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; }
|
|
|
11-20-2010, 01:32 AM
|
#3
|
LQ Newbie
Registered: Nov 2010
Posts: 12
Original Poster
Rep:
|
solved it myself...........thanks for all who have looked upon this
|
|
|
01-14-2011, 12:34 PM
|
#4
|
LQ Newbie
Registered: Jan 2011
Posts: 1
Rep:
|
Hi. I am seeing the same issue. How did you fix this?
Thanks
Ben
|
|
|
01-28-2011, 11:32 AM
|
#5
|
LQ Newbie
Registered: Jan 2010
Posts: 4
Rep:
|
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.
|
|
|
01-28-2011, 12:28 PM
|
#6
|
LQ Newbie
Registered: Jan 2010
Posts: 4
Rep:
|
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
:-*
|
|
|
01-28-2011, 01:35 PM
|
#7
|
LQ Newbie
Registered: Jan 2010
Posts: 4
Rep:
|
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 .....
|
|
|
All times are GMT -5. The time now is 11:34 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|