{"id":90919,"date":"2020-05-14T05:48:15","date_gmt":"2020-05-13T21:48:15","guid":{"rendered":"http:\/\/4563.org\/?p=90919"},"modified":"2020-05-14T05:48:15","modified_gmt":"2020-05-13T21:48:15","slug":"macos-%e5%a6%82%e4%bd%95%e5%90%8c%e6%97%b6%e5%ae%89%e8%a3%85-openssl-%e7%9a%84%e5%8a%a8%e6%80%81%e9%93%be%e6%8e%a5%e5%ba%93-libssl-1-1-dylib-%e5%92%8c-libssl-1-0-0-dylib%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=90919","title":{"rendered":"macOS \u5982\u4f55\u540c\u65f6\u5b89\u88c5 OpenSSL \u7684\u52a8\u6001\u94fe\u63a5\u5e93 libssl.1.1.dylib \u548c libssl.1.0.0.dylib\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  macOS \u5982\u4f55\u540c\u65f6\u5b89\u88c5 OpenSSL \u7684\u52a8\u6001\u94fe\u63a5\u5e93 libssl.1.1.dylib \u548c libssl.1.0.0.dylib\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : johannhuang <\/span>  <span><i><\/i> 14<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        \u6211\u9047\u5230\u7684\u60c5\u51b5\u662f\u8fd9\u6837\u7684\uff0c\u4ece GitHub \u4e0b\u8f7d\u4e86\u4e00\u4e2a C++\u7684\u9879\u76ee\u4ee3\u7801\uff0c\u7136\u540e cmake \u7684\u65f6\u5019\u51fa\u73b0\u4e86\u4e0b\u9762\u7684\u62a5\u9519\u4fe1\u606f<\/p>\n<p>&#8220;`<br \/>dyld: Library not loaded: \/opt\/local\/lib\/libssl.1.0.0.dylib<br \/> Referenced from: \/opt\/local\/lib\/libcurl.4.dylib<br \/> Reason: image not found<br \/>Abort trap: 6<br \/>&#8220;`<\/p>\n<p>\u6211\u7684 OpenSSL \u662f\u7ecf\u8fc7 Homebrew \u65b0\u5b89\u88c5\u8fc7\u7684\uff0c\u6240\u4ee5\u6211\u80fd\u5728 \/opt\/local\/lib\/\u76ee\u5f55\u4e0b\u627e\u5230 libssl.dylib, libssl.a, libssl.1.1.dylib \u3002\u4e5f\u5c31\u662f\u5f88\u660e\u663e\uff0c\u73b0\u5728\u7684\u6700\u65b0\u7248\u5c31\u662f 1.1\uff0c\u7136\u800c\u4e0d\u77e5\u9053\u9879\u76ee\u91cc\u9762\u90a3\u4e2a\u5730\u65b9\u4f7f\u7528\u4e86 libcurl\uff0c\u800c libcurl \u4f3c\u4e4e\u786c\u6027\u6307\u5b9a\u4e86\u4f7f\u7528 libssl.1.0.0.dylib \uff08\u6211\u5bf9 C++\u7f16\u8bd1\u7cfb\u7edf\u7406\u89e3\u6709\u9650\uff0c\u4e5f\u8bb8\u662f\u5176\u4ed6\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u95ee\u9898\uff09\uff0c\u6240\u4ee5\u56e0\u4e3a\u7f3a\u5c11 1.0.\u30020 \u7248\u672c\u5bfc\u81f4\u62a5\u9519\u3002<\/p>\n<p>\u6240\u4ee5\u5404\u4f4d\u6280\u672f\u670b\u53cb\uff0c\u4f60\u4eec\u6307\u5b9a macOS \u4e0a\u600e\u4e48\u540c\u65f6\u4f18\u96c5\u7684\u5b58\u5728 libssl.1.1.dylib \u4ee5\u53ca libssl.1.0.0.dylib \u4e48\uff1f      <\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>16<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"1318158\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : johannhuang <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             V2 \u4e0a\u7684\u76f8\u5173\u95ee\u9898\u53ca\u94fe\u63a5<\/p>\n<p>&#8211; \u54ea\u91cc\u4e0b\u8f7d libssl.so.1.0.0 \u548c libcrypt.so.1.0.0 ?\uff0chttps:\/\/www.v2ex.com\/t\/366463<br \/>&#8211; MacOS Catalina Python \u610f\u5916\u9000\u51fa\u89e3\u51b3\uff0chttps:\/\/www.v2ex.com\/t\/609382<br \/>&#8211; \u8bf7\u95ee\u5347\u7ea7 OpenSSL \u7684\u95ee\u9898\u3002\uff0chttps:\/\/www.v2ex.com\/t\/654914<\/p>\n<p>\u7136\u800c\uff0c\u4e0a\u9762\u95ee\u9898\u7684\u89e3\u51b3\u529e\u6cd5\u6211\u62c5\u5fc3\u4f1a\u7834\u574f\u672c\u8eab\u4f7f\u7528\u65b0\u7248 libssl1.1.dylib \u7684\u60c5\u51b5\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1318159\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : johannhuang <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u95ee\u9898\u611f\u89c9\u8fd8\u662f\u5e94\u8be5\u4ece\u89e3\u51b3 libcurl \u5165\u624b\uff0c\u56e0\u4e3a\u6211\u5f3a\u884c \u7ed9 1.0.0 \u52a0\u94fe\u63a5\u5230 1.1 \u540e\uff0c\u8fd8\u662f\u62a5\u9519\u4e86\u3002<\/p>\n<p>&#8220;`<br \/>dyld: Symbol not found: _MD5_Final<br \/> Referenced from: \/opt\/local\/lib\/libcurl.4.dylib<br \/> Expected in: \/opt\/local\/lib\/libcrypto.1.0.0.dylib<br \/> in \/opt\/local\/lib\/libcurl.4.dylib<br \/>Abort trap: 6<br \/>&#8220;`                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1318160\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Kobayashi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u628a\u9879\u76ee\u53d1\u51fa\u6765\uff0c\u7b49\u4e0b\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1318161\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lcdtyph <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \/opt\/local \u4e0d\u662f macports \u7684 prefix \u5417\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1318162\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : arischow <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u4e0a\u6b21\u8dd1 wget \u51fa\u73b0\u7c7b\u4f3c\u9519\u8bef\uff0c\u4e8e\u662f\u6211 brew reinstall wget                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1318163\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : arischow <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e0a\u8bf4\u5f97\u6709\u70b9\u9053\u7406\uff0c\u770b\u8d77\u6765 prefix \u4e0d\u662f homebrew                                                             <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1318164\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : IgniteWhite <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             prefix \u4e00\u822c\u662f \/usr\/local                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1318165\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : arischow <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             brew switch \u4e86\u89e3\u4e00\u4e0b\uff0c\u53e6 \u4f60\u8fd9\u4e2a\u95ee\u9898 Google \u6709\u7b54\u6848\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1318166\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : tianshilei1992 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             CMake \u67e5\u627e library \u7684\u89c4\u5219\u662f hard code \u5728 CMake \u81ea\u5df1\u91cc\u9762\u7684\u3002\u4e0d\u59a8\u8bd5\u8bd5\u6709\u4ec0\u4e48\u73af\u5883\u53d8\u91cf\u53ef\u4ee5\u8ba9 CMake \u4f18\u5148\u53bb\u67e5\u627e\u4f60\u81ea\u5df1\u88c5\u7684\u8fd9\u4e2a library path \u3002<br \/>\u8fd8\u6709\u4e00\u4e2a\u529e\u6cd5\u5c31\u662f\uff08\u4e00\u5b9a\u4f1a\u6210\u529f\uff09\uff0c\u627e\u627e find_library(ssl) \u6210\u529f\u4ee5\u540e\u4f1a\u8bbe\u7f6e\u54ea\u4e9b CMake \u7684\u53d8\u91cf\uff0c\u7136\u540e\u5728 CMake \u7684\u65f6\u5019\u628a\u8fd9\u51e0\u4e2a\u53d8\u91cf\u624b\u52a8\u6307\u5b9a\u8fdb\u53bb\u5c31\u597d\u4e86\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1318167\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : johannhuang <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @arischow \u6211\u8fd9\u4e2a\u95ee\u9898 Goolge \u4e0a\u6709\u5f88\u591a\u9519\u8bef\u7b54\u6848\u3002\u8981\u4e0d\u7136\u4e5f\u4e0d\u4f1a\u5728\u8fd9\u91cc\u8d34\u51fa\u6765\u6c42\u52a9\u4e86\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1318168\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : johannhuang <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Kobayashi \u8fd9\u4e2a\u548c\u9879\u76ee\u6ca1\u5565\u5173\u7cfb\u4e86\uff0c\u56e0\u4e3a\u9519\u8bef\u62a5\u7684\u7b97\u662f\u5f88\u660e\u786e\u4e86\u3002\u5c31\u662f\u8fd9\u73a9\u610f\u513f \/opt\/local\/lib\/libcurl.4.dylib \u5f15\u7528\u4e0d\u5230\u60f3\u8981\u7684\u52a8\u6001\u94fe\u63a5\u5e93\u4e86\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1318169\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : johannhuang <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @lcdtyph \u8c22\u8c22 \u5e94\u8be5\u5c31\u662f\u4f60\u8bf4\u7684 macports \u641e\u4e8b\u60c5\u4e86\u3002\u6211\u4e4b\u524d\u7528\u8fc7 macports\uff0c\u53ef\u80fd\u5c31\u662f\u88ab ports \u641e\u51fa\u95ee\u9898\u4e86\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1318170\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lcdtyph <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @johannhuang #12 <br \/>\u4f60\u53ef\u4ee5\u90fd\u7528 homebrew \u7684\u7ec4\u4ef6\uff0cbrew install curl-openssl \u8fd9\u4e2a curl \u662f link \u5230 brew \u81ea\u5df1\u7684 openssl1.1 \u7684<br \/>\u5982\u679c\u4f60\u4e0d\u9700\u8981 macports \u7684\u8bdd\u6700\u597d\u628a\u5b83\u7684\u8def\u5f84\u4ece\u73af\u5883\u53d8\u91cf\u91cc\u79fb\u9664                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1318171\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : johannhuang <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u95ee\u9898\u76f8\u5173\u94fe\u63a5\uff0c\u4ee5\u9632\u6709\u540e\u6765\u7684\u5c0f\u4f19\u4f34\u9047\u5230\u540c\u6837\u7684\u95ee\u9898 https:\/\/stackoverflow.com\/questions\/44290925\/curl-gives-an-error-on-mac-os                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1318172\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Kobayashi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u8fd9\u662f macports \u6ca1\u5378\u8f7d\u554a\uff1f\u73af\u5883\u53d8\u91cf PATH \u91cc\u8fd8\u6709 \/opt\/local\/bin                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1318173\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : johannhuang <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @lcdtyph \u6211\u628a macports \u7684\u5305\u5347\u7ea7\u4e86\u540e\u5c31\u53ef\u4ee5\u4e86\u3002Homebrew \u4f7f\u7528\u7684 link \u7684\u65b9\u5f0f\uff0cMacPorts \u7528\u7684\u73af\u5883\u53d8\u91cf\u524d\u7f6e\uff0c\u6211\u8fd8\u662f\u60f3\u90fd\u7559\u7740\u7684\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>macOS \u5982\u4f55\u540c\u65f6\u5b89\u88c5 Open&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/90919"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=90919"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/90919\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=90919"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=90919"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=90919"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}