{"id":42,"date":"2017-08-01T15:04:15","date_gmt":"2017-08-01T07:04:15","guid":{"rendered":"http:\/\/www.aymoo.com\/?p=42"},"modified":"2017-08-01T15:07:49","modified_gmt":"2017-08-01T07:07:49","slug":"mac%e7%bc%96%e8%af%91nginx-lua%e6%a8%a1%e5%9d%97%e6%8a%a5-ld-symbols-not-found-for-architecture-x86_64","status":"publish","type":"post","link":"http:\/\/www.aymoo.com\/?p=42","title":{"rendered":"mac\u7f16\u8bd1nginx lua\u6a21\u5757\u62a5 ld: symbol(s) not found for architecture x86_64"},"content":{"rendered":"<p>mac\u4e0a\u6e90\u7801\u7f16\u8bd1\u5b89\u88c5nginx lua\u6a21\u5757\uff0c make\u65f6\u62a5ld: symbol(s) not found for architecture x86_64\u9519\u8bef\uff0c<\/p>\n<p>\u5177\u4f53\u4e3a<\/p>\n<pre lang=\"bash\">-Wl,-rpath,\/usr\/local\/openresty\/luajit\/lib -L\/Applications\/ngx_openresty-1.4.3.6\/build\/luajit-root\/usr\/local\/openresty\/luajit\/lib -lluajit-5.1 -lm -pagezero_size 10000 -image_base 100000000 -lpcre -lssl -lcrypto -lz\r\nUndefined symbols for architecture x86_64:\r\n\"_pcre_free_study\", referenced from:\r\n_ngx_http_lua_regex_free_study_data in ngx_http_lua_regex.o\r\nld: symbol(s) not found for architecture x86_64\r\nclang: error: linker command failed with exit code 1 (use -v to see invocation)\r\nmake[2]: *** [objs\/nginx] Error 1\r\nmake[1]: *** [build] Error 2\r\nmake: *** [all] Error 2\r\n<\/pre>\n<p>\u767e\u5ea6\u51fa\u7684\u89e3\u51b3\u65b9\u6cd5\u4e94\u82b1\u516b\u95e8\uff0c\u4eb2\u81ea\u5c1d\u8bd5\u90fd\u6ca1\u89e3\u51b3\u95ee\u9898\uff0c<\/p>\n<p>\u627e\u5230\u4e00\u7bc7\u6587\u7ae0 <a href=\"http:\/\/www.mamicode.com\/info-detail-1345456.html\" target=\"_blank\">http:\/\/www.mamicode.com\/info-detail-1345456.html<\/a>\uff0c\u53d1\u73b0\u662f\u67e5\u627epcre\u7684\u95ee\u9898\u3002<\/p>\n<p>\u89e3\u51b3\u65b9\u6cd5\u5982\u4e0b:<\/p>\n<pre lang=\"bash\"># mdfind pcre | grep \/usr\/local<\/pre>\n<p>\u627e\u5230 pcre \u6240\u5728\u76ee\u5f55 \/usr\/local\/Cellar\/pcre\/8.36\/<\/p>\n<p>\u4fee\u6539nginx\u7f16\u8bd1\u53c2\u6570\uff0c\u95ee\u9898\u89e3\u51b3<\/p>\n<pre lang=\"bash\">--prefix=\/usr\/local\/nginx --add-module=\/usr\/local\/src\/echo-nginx-module --add-module=\/usr\/local\/src\/nginx-http-concat --with-http_stub_status_module --with-http_ssl_module --with-pcre --with-debug --with-pcre-jit --add-module=\/usr\/local\/src\/ngx_devel_kit-0.3.0 --add-module=\/usr\/local\/src\/lua-nginx-module-0.10.9rc8 --with-cc-opt=\"-I\/usr\/local\/Cellar\/pcre\/8.36\/include\" --with-ld-opt=\"-L\/usr\/local\/Cellar\/pcre\/8.36\/lib\"<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>mac\u4e0a\u6e90\u7801\u7f16\u8bd1\u5b89\u88c5nginx lua\u6a21\u5757\uff0c make\u65f6\u62a5ld: symbol(s) not found fo [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/www.aymoo.com\/index.php?rest_route=\/wp\/v2\/posts\/42"}],"collection":[{"href":"http:\/\/www.aymoo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.aymoo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.aymoo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.aymoo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=42"}],"version-history":[{"count":4,"href":"http:\/\/www.aymoo.com\/index.php?rest_route=\/wp\/v2\/posts\/42\/revisions"}],"predecessor-version":[{"id":46,"href":"http:\/\/www.aymoo.com\/index.php?rest_route=\/wp\/v2\/posts\/42\/revisions\/46"}],"wp:attachment":[{"href":"http:\/\/www.aymoo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=42"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.aymoo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=42"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.aymoo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=42"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}