{"id":2622,"date":"2015-09-03T02:21:59","date_gmt":"2015-09-03T02:21:59","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=2622"},"modified":"2015-09-03T02:21:59","modified_gmt":"2015-09-03T02:21:59","slug":"percona-with-cpanel-libmysqlclient-so-18-cannot-open-shared-object-file","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2015\/09\/03\/percona-with-cpanel-libmysqlclient-so-18-cannot-open-shared-object-file\/","title":{"rendered":"Percona with cPanel: libmysqlclient.so.18: cannot open shared object file"},"content":{"rendered":"<p>A recent Percona upgrade caused problems with PHP on some cPanel servers. The name of the libmysqlclient library was changed without keeping a symlink to the original name, which caused PHP to throw errors, and EasyApache not compiling successfully.<\/p>\n<p>Running php -v will show it&#8230;<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nphp -v\nphp: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory\n\n<\/pre>\n<p>From the Percona Server 5.5.36-34.0 Release Notes: <a href=\"https:\/\/my.fusioned.net\/knowledgebase\/10100\/Percona-with-cPanel-libmysqlclientso18-cannot-open-shared-object-file.html\" target=\"_blank\" rel=\"noopener\">https:\/\/my.fusioned.net\/knowledgebase\/10100\/Percona-with-cPanel-libmysqlclientso18-cannot-open-shared-object-file.html<\/a><\/p>\n<p>    In order to comply with Linux distribution packaging standards Percona\u2018s version of libmysqlclient has been renamed to libperconaserver. The old name was conflicting with the upstream libmysqlclient. Except for packaging, libmysqlclient and libperconaserverclient of the same version do not have any differences. Users wishing to continue using libmysqlclient will have to install the corresponding package of their distribution, such as mysql-lib for CentOS and libmysqlclient18 for Ubuntu\/Debian. Users wishing to build software against libperconaserverclient should install libperconaserverclient-dev package. An old version of Percona-built libmysqlclient will be available for download.<\/p>\n<p>You simply need to symlink libperconaserver to libmysqlclient, and here&#8217;s how it&#8217;s done:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# ln -s \/usr\/lib64\/libperconaserverclient.so \/usr\/lib64\/libmysqlclient.so\n# ln -s \/usr\/lib64\/libperconaserverclient.so.18 \/usr\/lib64\/libmysqlclient.so.18\n\n<\/pre>\n<p>(Note: for RHEL\/CentoOS\/CL 6 x86, replace \/usr\/lib64 with \/usr\/lib)<\/p>\n<p>Finally, re-run EasyApache to compile PHP against the new libraries:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# \/scripts\/easyapache --build\n\n<\/pre>\n<p>Note: After running this, this error appeared on php sites&#8230;<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\nERROR: Database Error: The MySQL adapter &quot;mysql&quot; is not available.\n\n<\/pre>\n<p>Checked and the symlinks were not real as there were missing files.<\/p>\n<p>Check perconal rpm&#8217;s<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nrpm -qa |grep PerconaPercona-Server-shared-compat-5.5.35-rel33.0.611.rhel5\nPercona-Server-shared-56-5.6.16-rel64.0.el5\nPercona-Server-client-56-5.6.16-rel64.0.el5\nPercona-Server-devel-56-5.6.16-rel64.0.el5\nPercona-Server-server-56-5.6.16-rel64.0.el5\n<\/pre>\n<p>I removed the symlinks and applied<\/p>\n<p>Removed the symlinks and then followed this cpanel article symlink at the bottom to rebuild.<\/p>\n<p>Another resource:<br \/>\n<a href=\"https:\/\/documentation.cpanel.net\/display\/CKB\/How+to+Replace+MySQL+with+Percona\" target=\"_blank\" rel=\"noopener\">https:\/\/documentation.cpanel.net\/display\/CKB\/How+to+Replace+MySQL+with+Percona<\/a><\/p>\n<p>Cpanel Documentation<br \/>\n<a href=\"https:\/\/documentation.cpanel.net\/display\/CKB\/How+to+Update+a+Percona+Installation\" target=\"_blank\" rel=\"noopener\">https:\/\/documentation.cpanel.net\/display\/CKB\/How+to+Update+a+Percona+Installation<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A recent Percona upgrade caused problems with PHP on some cPanel servers. The name of the libmysqlclient library was changed without keeping a symlink to the original name, which caused PHP to throw errors, and EasyApache not compiling successfully. Running php -v will show it&#8230; php -v php: error while loading shared libraries: libmysqlclient.so.18: cannot &#8230; <a title=\"Percona with cPanel: libmysqlclient.so.18: cannot open shared object file\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2015\/09\/03\/percona-with-cpanel-libmysqlclient-so-18-cannot-open-shared-object-file\/\" aria-label=\"Read more about Percona with cPanel: libmysqlclient.so.18: cannot open shared object file\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,83],"tags":[],"class_list":["post-2622","post","type-post","status-publish","format-standard","hentry","category-cpanel","category-percona"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/2622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=2622"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/2622\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=2622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=2622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=2622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}