{"id":9624,"date":"2018-07-06T15:35:21","date_gmt":"2018-07-06T06:35:21","guid":{"rendered":"https:\/\/www.itblog.jp\/?p=9624"},"modified":"2018-07-06T15:39:06","modified_gmt":"2018-07-06T06:39:06","slug":"macosx-high-sierra%e3%81%a7%e3%81%aelibrary-not-loaded-libmysqlclient-18-dylib%e3%81%b8%e3%81%ae%e5%af%be%e5%87%a6%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.itblog.jp\/?p=9624","title":{"rendered":"MacOSX High Sierra\u3067\u306eLibrary not loaded: libmysqlclient.18.dylib\u3078\u306e\u5bfe\u51e6\u6cd5"},"content":{"rendered":"<p>Mac OS S High Siera\u3067\u3001python\u3067MySQL\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u4f7f\u7528\u3057\u3066\u3044\u305f\u3068\u3053\u308d\u3001\u4ee5\u4e0b\u306e\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u3066\u3057\u307e\u3044\u5bfe\u51e6\u306b\u56f0\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u74b0\u5883\u306f\u3001<br \/>\nOS:Mac OS S High Siera<br \/>\nMySQL\u30d0\u30fc\u30b8\u30e7\u30f3:5.6<br \/>\npython\u30d0\u30fc\u30b8\u30e7\u30f3:3.6.1<br \/>\n\u3067\u3059\u3002<\/p>\n<p>ImportError: dlopen(\/Library\/WebServer\/Documents\/crawl\/scraping\/lib\/python3.6\/site-packages\/_mysql.cpython-36m-darwin.so, 2): Library not loaded: libmysqlclient.18.dylib<\/p>\n<p>\u539f\u56e0\u306b\u3064\u3044\u3066\u8abf\u3079\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u8a72\u5f53\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u958b\u3051\u306a\u3044\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u8a72\u5f53\u30d5\u30a1\u30a4\u30eb\u3078\u306e\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u89e3\u6c7a\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u305a\u3001<\/p>\n<p>find \/ -name libmysqlclient.18.dylib<\/p>\n<p>\u3067\u3001\u8a72\u5f53\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u5b58\u5728\u3057\u3066\u3044\u308b\u5834\u6240\u3092\u8abf\u3079\u307e\u3059\u3002<br \/>\n\u79c1\u306e\u5834\u5408\u306f\u3001<\/p>\n<p>\/usr\/local\/mysql-5.6.19-osx10.7-x86_64\/lib\/libmysqlclient.18.dylib<\/p>\n<p>\u306b\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u3092\u8a2d\u5b9a\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>sudo ln -s \/usr\/local\/mysql-5.6.19-osx10.7-x86_64\/lib\/libmysqlclient.18.dylib \/usr\/local\/lib\/libmysqlclient.18.dylib<\/p>\n<p>\u79c1\u306e\u5834\u5408\u306f\u3001\u4ee5\u4e0a\u306e\u624b\u9806\u3067\u89e3\u6c7a\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>Linux\u30b5\u30fc\u30d0\u306e\u5834\u5408\u306f\u3001\/usr\/local\/lib\/\u3000\u3067\u306a\u304f\u3001 \/user\/lib\/\u3000\u306e\u30d1\u30b9\u3089\u3057\u3044\u306e\u3067\u3059\u304c\u3001MacOSX\u306e\u5834\u5408\u306f\u3001 \/user\/lib\/ \u306e\u30d1\u30b9\u304c\u30b9\u30fc\u30d1\u30fc\u30e6\u30fc\u30b6\u3067\u3082\u66f8\u304d\u8fbc\u307f\u4e0d\u53ef\u306b\u306a\u3063\u3066\u3044\u3066\u3001 \/usr\/lobal\/lib\/\u304c\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u306e\u8a2d\u5b9a\u7b87\u6240\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mac OS S High Siera\u3067\u3001python\u3067MySQL\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u4f7f\u7528\u3057\u3066\u3044\u305f\u3068\u3053\u308d\u3001\u4ee5\u4e0b\u306e\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u3066\u3057\u307e\u3044\u5bfe\u51e6\u306b\u56f0\u308a\u307e\u3057\u305f\u3002 \u74b0\u5883\u306f\u3001 OS:Mac OS S High Sie [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[150,131],"tags":[],"class_list":["post-9624","post","type-post","status-publish","format-standard","hentry","category-python-","category-131"],"_links":{"self":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts\/9624","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9624"}],"version-history":[{"count":0,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts\/9624\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9624"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}