Permalänk
Medlem

Problem med mysql-stöd i PHP

Jag kan inte kompilera PHP med mysql-stöd. Mysql är installerat i /usr/local/mysql
Jag kör följande php-config:

./configure --with-apxs2=/www/bin/apxs --with-mysql=/usr/local/mysql

Jag får följande fel:

checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... no checking for MySQL UNIX socket location... /tmp/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.

config.log:

configure:57738: checking for MySQL support configure:57784: checking for specified location of the MySQL UNIX socket configure:57841: checking for MySQL UNIX socket location configure:58031: checking for mysql_close in -lmysqlclient configure:58050: gcc -o conftest -I/usr/include -g -O2 -L/usr/lib conftest.c -lmysqlclient -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm 1>&5 /usr/lib/gcc/i486-slackware-linux/3.4.6/../../../../i486-slackware-linux/bin/ld: cannot find -lmysqlclient collect2: ld returned 1 exit status configure: failed program was: #line 58039 "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:58271: checking for mysql_error in -lmysqlclient configure:58290: gcc -o conftest -I/usr/include -g -O2 -L/usr/lib -Wl,-rpath,/usr -L/usr conftest.c -lmysqlclient -lz -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm 1>&5 /usr/lib/gcc/i486-slackware-linux/3.4.6/../../../../i486-slackware-linux/bin/ld: cannot find -lmysqlclient collect2: ld returned 1 exit status configure: failed program was: #line 58279 "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; }

Här är hela config.log: http://static.supaknerka.com/config.log

Mjukvara:
php-5.1.6
mysql-standard-5.0.26
apache2

OS: Slackware 11

Någon som vet vad det kan vara?

Permalänk
Medlem

Den kan inte hitta libmysqlclient.so

Citat:

...cannot find -lmysqlclient ...

Prova att lägga till katalogen med libfilen i variabeln LD_LIBRARY_PATH

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mysql/lib:/usr/local/mysql/lib/mysql

Visa signatur

Kriga mot min brute: http://gunnard.se.mybrute.com om du vågar :D

Permalänk
Medlem

Hmm... Var lägger jag till det?

Permalänk
Medlem

Ge kommandot innan du kör configure

Visa signatur

Kriga mot min brute: http://gunnard.se.mybrute.com om du vågar :D