Re: “libmysqlclient.so.16: cannot op en shared object” when installing PHP

From: Date: Wed, 15 Jun 2016 18:45:44 +0000
Subject: Re: “libmysqlclient.so.16: cannot op en shared object” when installing PHP
References: 1  Groups: php.install 
Request: Send a blank email to php-install+get-20477@lists.php.net to get a copy of this message
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 <tarmstrong@gmail.com> 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

« previous php.install (#20477) next »