﻿{"id":1986,"date":"2019-08-21T23:42:18","date_gmt":"2019-08-21T15:42:18","guid":{"rendered":"http:\/\/nick.txtcc.com\/?p=1986"},"modified":"2019-08-21T23:42:18","modified_gmt":"2019-08-21T15:42:18","slug":"mac%e8%a7%a3%e5%86%b3%e5%ae%89%e8%a3%85mysql-python%e9%94%99%e8%af%afmy_config-h","status":"publish","type":"post","link":"http:\/\/nick.txtcc.com\/index.php\/python\/1986","title":{"rendered":"mac\u89e3\u51b3\u5b89\u88c5mysql-python\u9519\u8befmy_config.h"},"content":{"rendered":"<pre><code>brew install mysql\nbrew unlink mysql\nbrew install mysql-connector-c\nsed -i -e 's\/libs=&quot;$libs -l &quot;\/libs=&quot;$libs -lmysqlclient -lssl -lcrypto&quot;\/g' \/usr\/local\/bin\/mysql_config\npip install MySQL-python\nbrew unlink mysql-connector-c\nbrew link --overwrite mysql\n<\/code><\/pre>\n<p class=\"p1\"><span class=\"s1\">\u51fa\u73b0\u4e0b\u5217\u9519\u8bef\uff1a<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">ld: library not found for -lssl<\/span><\/p>\n<p class=\"p1\">\u89e3\u51b3\uff1a<\/p>\n<p class=\"p1\"><span class=\"s1\">sudo env LDFLAGS=&#8221;-I\/usr\/local\/opt\/openssl\/include -L\/usr\/local\/opt\/openssl\/lib&#8221; pip install MySQL-python<\/span><\/p>","protected":false},"excerpt":{"rendered":"<p>brew install mysql brew unlink mysql brew install mysql-connector-c sed -i -e &#8216;s\/libs=&#8221;$libs -l&#46;&#46;&#46;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[340,274],"tags":[],"class_list":["post-1986","post","type-post","status-publish","format-standard","hentry","category-mac-os","category-python"],"_links":{"self":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/1986","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/comments?post=1986"}],"version-history":[{"count":1,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/1986\/revisions"}],"predecessor-version":[{"id":1987,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/1986\/revisions\/1987"}],"wp:attachment":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/media?parent=1986"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/categories?post=1986"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/tags?post=1986"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}