Re: [PHP-INSTALL] “libmysqlclient.so.16: cannot op en shared object” when installing PHP
David Parker <[email protected]> Wed, 15 Jun 2016 14:45:44 -0400
| Newsgroups | gmane.comp.php.install |
|---|---|
| Message-ID | <CAHoJ95VTfgP5HJWs2EN2PKEX2ZFUfYGG8FozKu792vx3xkjfFA@mail.gmail.com> |
--001a114827ac9a99c405355588d6 Content-Type: text/plain; charset=UTF-8 Not sure, I've never compiled PHP on a Pi before. Is it possible you have the wrong architecture of MySQL? For example, x86 (or x86-64) while you're trying to compile PHP on ARM? On Wed, Jun 15, 2016 at 2:07 PM, thomas Armstrong <[email protected]> wrote: > Hi. > > Trying to install PHP 5.2.17 (with MySQL 5.1.55) on a Linux box: > > --------- > # ./configure --prefix=/usr/local/php > --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql > ----------- > > I get this error within my 'debug.log' file: > --------------- > CONFIGURE: './configure' '--prefix=/usr/local/php' > '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql=/usr/local/mysql' > CC: gcc > CFLAGS: -I/usr/include -g -O2 > CPPFLAGS: > CXX: > CXXFLAGS: > INCLUDES: -I/home/pi/lampsources/php-5.2.17/ext/date/lib > -I/usr/include/libxml2 -I/usr/local/mysql/include/mysql > LDFLAGS: -L/usr/lib -R/usr/local/mysql/lib/mysql > -L/usr/local/mysql/lib/mysql > LIBS: -lcrypt -lrt -lmysqlclient -lrt -lresolv -lm -ldl -lnsl > -lxml2 -lxml2 -lxml2 -lcrypt > DLIBS: > SAPI: apache2handler > PHP_RPATHS: /usr/local/mysql/lib/mysql > uname -a: Linux raspberrypi 4.4.9+ #884 Fri May 6 17:25:37 BST 2016 > armv6l GNU/Linux > > gcc -o conftest -I/usr/include -g -O2 -L/usr/lib > -R/usr/local/mysql/lib/mysql -L/usr/local/mysql/lib/mysql conftest.c > -lcrypt -lrt -lmysqlclient -lrt -lresolv -lm -ldl -lnsl -lxml2 -lxml2 > -lxml2 -lcrypt 1>&5 > conftest.c: In function 'main': > conftest.c:3:3: warning: incompatible implicit declaration of built-in > function 'exit' > exit(0); > ^ > ./conftest: error while loading shared libraries: libmysqlclient.so.16: > cannot open shared object file: No such file or directory > -------------------- > > If I browse '/usr/local/mysql/include/mysql' contents: > ---------- > # cd /usr/local/mysql/lib/mysql > # ls -l > total 11736 > -rw-r--r-- 1 root staff 7450 Jun 7 22:27 libdbug.a > -rw-r--r-- 1 root staff 521222 Jun 7 22:28 libheap.a > -rw-r--r-- 1 root staff 2438930 Jun 7 22:28 libmyisam.a > -rw-r--r-- 1 root staff 735778 Jun 7 22:28 libmyisammrg.a > -rw-r--r-- 1 root staff 1762244 Jun 7 22:27 libmysqlclient.a > -rwxr-xr-x 1 root staff 1013 Jun 7 22:27 libmysqlclient.la > lrwxrwxrwx 1 root staff 24 Jun 7 22:27 libmysqlclient.so -> > libmysqlclient.so.16.0.0 > lrwxrwxrwx 1 root staff 24 Jun 7 22:27 libmysqlclient.so.16 -> > libmysqlclient.so.16.0.0 > -rwxr-xr-x 1 root staff 1219344 Jun 7 22:27 libmysqlclient.so.16.0.0 > -rw-r--r-- 1 root staff 1835708 Jun 7 22:27 libmysqlclient_r.a > -rwxr-xr-x 1 root staff 1067 Jun 7 22:27 libmysqlclient_r.la > lrwxrwxrwx 1 root staff 26 Jun 7 22:27 libmysqlclient_r.so -> > libmysqlclient_r.so.16.0.0 > lrwxrwxrwx 1 root staff 26 Jun 7 22:27 libmysqlclient_r.so.16 -> > libmysqlclient_r.so.16.0.0 > -rwxr-xr-x 1 root staff 1267368 Jun 7 22:27 libmysqlclient_r.so.16.0.0 > -rw-r--r-- 1 root staff 781372 Jun 7 22:27 libmystrings.a > -rw-r--r-- 1 root staff 1380062 Jun 7 22:27 libmysys.a > -rw-r--r-- 1 root staff 35420 Jun 7 22:28 libvio.a > drwxr-sr-x 2 root staff 4096 Jun 7 22:28 plugin > -------------- > > What am I doing wrong? I run 'ldconfig' after installing MySQL from > sources. > > Thank you very much in advance. > -- Dave Parker Systems Administrator Utica College Integrated Information Technology Services (315) 792-3229 Registered Linux User #408177 --001a114827ac9a99c405355588d6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Not sure, I've never compiled PHP on a Pi before.=C2= =A0 Is it possible you have the wrong architecture of MySQL?=C2=A0 For exam= ple, x86 (or x86-64) while you're trying to compile PHP on ARM?</div><d= iv class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Wed, Jun 15, 201= 6 at 2:07 PM, thomas Armstrong <span dir=3D"ltr"><<a href=3D"mailto:tarm= [email protected]" target=3D"_blank">[email protected]</a>></span> wro= te:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-= left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div>Hi.<br><br>Tryi= ng to install PHP 5.2.17 (with MySQL 5.1.55) on a Linux box:<br><br>-------= --<br># ./configure --prefix=3D/usr/local/php --with-apxs2=3D/usr/local/apa= che2/bin/apxs --with-mysql=3D/usr/local/mysql<br>-----------<br><br>I get t= his error within my 'debug.log' file:<br>---------------<br>CONFIGU= RE:=C2=A0=C2=A0 './configure'=C2=A0 '--prefix=3D/usr/local/php&= #39; '--with-apxs2=3D/usr/local/apache2/bin/apxs' '--with-mysql= =3D/usr/local/mysql'<br>CC:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 gcc<br>CFLAGS:=C2=A0=C2=A0=C2=A0=C2=A0 -I/usr/include -g -O2<br>CPPF= LAGS:<br>CXX:<br>CXXFLAGS:<br>INCLUDES:=C2=A0=C2=A0=C2=A0 -I/home/pi/lampso= urces/php-5.2.17/ext/date/lib -I/usr/include/libxml2 -I/usr/local/mysql/inc= lude/mysql<br>LDFLAGS:=C2=A0=C2=A0=C2=A0 -L/usr/lib=C2=A0 -R/usr/local/mysq= l/lib/mysql -L/usr/local/mysql/lib/mysql<br>LIBS:=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 -lcrypt -lrt -lmysqlclient -lrt -lresolv -lm -ldl -lnsl=C2=A0 = -lxml2 -lxml2 -lxml2 -lcrypt<br>DLIBS:<br>SAPI:=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 apache2handler<br>PHP_RPATHS:=C2=A0 /usr/local/mysql/lib/mysql<br= >uname -a:=C2=A0=C2=A0 Linux raspberrypi 4.4.9+ #884 Fri May 6 17:25:37 BST= 2016 armv6l GNU/Linux<br><br>gcc -o conftest -I/usr/include -g -O2=C2=A0 -= L/usr/lib=C2=A0 -R/usr/local/mysql/lib/mysql -L/usr/local/mysql/lib/mysql c= onftest.c -lcrypt -lrt -lmysqlclient -lrt -lresolv -lm -ldl -lnsl=C2=A0 -lx= ml2 -lxml2 -lxml2 -lcrypt 1>&5<br>conftest.c: In function 'main&= #39;:<br>conftest.c:3:3: warning: incompatible implicit declaration of buil= t-in function 'exit'<br>=C2=A0=C2=A0 exit(0);<br>=C2=A0=C2=A0 ^<br>= ./conftest: error while loading shared libraries: libmysqlclient.so.16: can= not open shared object file: No such file or directory<br>-----------------= ---<br><br>If I browse '/usr/local/mysql/include/mysql' contents:<b= r>----------<br># cd /usr/local/mysql/lib/mysql<br># ls -l<br>total 11736<b= r>-rw-r--r-- 1 root staff=C2=A0=C2=A0=C2=A0 7450 Jun=C2=A0 7 22:27 libdbug.= a<br>-rw-r--r-- 1 root staff=C2=A0 521222 Jun=C2=A0 7 22:28 libheap.a<br>-r= w-r--r-- 1 root staff 2438930 Jun=C2=A0 7 22:28 libmyisam.a<br>-rw-r--r-- 1= root staff=C2=A0 735778 Jun=C2=A0 7 22:28 libmyisammrg.a<br>-rw-r--r-- 1 r= oot staff 1762244 Jun=C2=A0 7 22:27 libmysqlclient.a<br>-rwxr-xr-x 1 root s= taff=C2=A0=C2=A0=C2=A0 1013 Jun=C2=A0 7 22:27 <a href=3D"http://libmysqlcli= ent.la" target=3D"_blank">libmysqlclient.la</a><br>lrwxrwxrwx 1 root staff= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 24 Jun=C2=A0 7 22:27 libmysqlclient.so ->= libmysqlclient.so.16.0.0<br>lrwxrwxrwx 1 root staff=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 24 Jun=C2=A0 7 22:27 libmysqlclient.so.16 -> libmysqlclient.so= .16.0.0<br>-rwxr-xr-x 1 root staff 1219344 Jun=C2=A0 7 22:27 libmysqlclient= .so.16.0.0<br>-rw-r--r-- 1 root staff 1835708 Jun=C2=A0 7 22:27 libmysqlcli= ent_r.a<br>-rwxr-xr-x 1 root staff=C2=A0=C2=A0=C2=A0 1067 Jun=C2=A0 7 22:27= <a href=3D"http://libmysqlclient_r.la" target=3D"_blank">libmysqlclient_r.= la</a><br>lrwxrwxrwx 1 root staff=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 26 Jun=C2= =A0 7 22:27 libmysqlclient_r.so -> libmysqlclient_r.so.16.0.0<br>lrwxrwx= rwx 1 root staff=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 26 Jun=C2=A0 7 22:27 libmysq= lclient_r.so.16 -> libmysqlclient_r.so.16.0.0<br>-rwxr-xr-x 1 root staff= 1267368 Jun=C2=A0 7 22:27 libmysqlclient_r.so.16.0.0<br>-rw-r--r-- 1 root = staff=C2=A0 781372 Jun=C2=A0 7 22:27 libmystrings.a<br>-rw-r--r-- 1 root st= aff 1380062 Jun=C2=A0 7 22:27 libmysys.a<br>-rw-r--r-- 1 root staff=C2=A0= =C2=A0 35420 Jun=C2=A0 7 22:28 libvio.a<br>drwxr-sr-x 2 root staff=C2=A0=C2= =A0=C2=A0 4096 Jun=C2=A0 7 22:28 plugin<br>--------------<br><br>What am I = doing wrong? I run 'ldconfig' after installing MySQL from sources.<= br><br>Thank you very much in advance.<br></div></div> </blockquote></div><br><br clear=3D"all"><div><br></div>-- <br><div class= =3D"gmail_signature" data-smartmail=3D"gmail_signature"><div>Dave Parker</d= iv>Systems Administrator<br>Utica College<br>Integrated Information Technol= ogy Services<br>(315) 792-3229<br>Registered Linux User #408177</div> </div> --001a114827ac9a99c405355588d6--