{"id":1965,"date":"2012-09-03T10:06:54","date_gmt":"2012-09-03T14:06:54","guid":{"rendered":"http:\/\/linuxhostingsupport.net\/blog\/?p=1965"},"modified":"2013-03-20T08:38:22","modified_gmt":"2013-03-20T12:38:22","slug":"configure-error-cannot-find-libmysqlclient-under-usr","status":"publish","type":"post","link":"https:\/\/linuxhostingsupport.net\/blog\/configure-error-cannot-find-libmysqlclient-under-usr","title":{"rendered":"configure: error: Cannot find libmysqlclient under \/usr"},"content":{"rendered":"<p>Recently I was configuring PHP with Mysql manually and it was really annoying to see the &#8220;<strong>Cannot find libmysqlclient under \/usr<\/strong>&#8221; error message. The configure line I used to install PHP was<\/p>\n<blockquote>\n<pre>.\/configure --with-mysql\u00a0 --with-libdir=\/usr\/lib<\/pre>\n<\/blockquote>\n<p>and the error that I received was<\/p>\n<blockquote>\n<pre>checking for MySQL UNIX socket location... \/var\/lib\/mysql\/mysql.sock\r\nconfigure: error: Cannot find libmysqlclient under \/usr.\r\nNote that the MySQL client library is not bundled anymore!<\/pre>\n<\/blockquote>\n<p>The error occurred because <strong>libmysqlclient wasn&#8217;t present in the \/usr\/lib directory<\/strong>. On further investigation, I noticed the <strong>libmysqlclient is installed in the \/usr\/lib64<\/strong> directory because the <strong>server is a 64bit machine<\/strong>.<\/p>\n<p>So the fix for the &#8220;mysql: Cannot find libmysqlclient under \/usr&#8221; error message is to <strong>provide lib64 directory path in the configure line<\/strong>.<\/p>\n<p>The configure line should read as follows:<\/p>\n<blockquote>\n<pre>.\/configure --with-mysql --with-libdir=lib64<\/pre>\n<\/blockquote>\n<p>That&#8217;s it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I was configuring PHP with Mysql manually and it was really annoying to see the &#8220;Cannot find libmysqlclient under \/usr&#8221; error message. The configure line I used to install PHP was<\/p>\n<p>.\/configure &#8211;with-mysql\u00a0 &#8211;with-libdir=\/usr\/lib<\/p>\n<p>and the error that I received was<\/p>\n<p>checking for MySQL UNIX socket location&#8230; \/var\/lib\/mysql\/mysql.sock<br \/>\nconfigure: error: Cannot find libmysqlclient under \/usr.<br \/>\nNote that the MySQL client library is not bundled anymore!<\/p>\n<p>The error occurred because libmysqlclient wasn&#8217;t present in the \/usr\/lib directory. On further investigation, I noticed the libmysqlclient is installed in the \/usr\/lib64 directory because the server is [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[1423,1426,1424,1425],"_links":{"self":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/1965"}],"collection":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/comments?post=1965"}],"version-history":[{"count":5,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/1965\/revisions"}],"predecessor-version":[{"id":1969,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/1965\/revisions\/1969"}],"wp:attachment":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/media?parent=1965"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/categories?post=1965"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/tags?post=1965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}