{"id":32141,"date":"2023-05-18T04:56:33","date_gmt":"2022-07-26T08:57:22","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85mac%e3%80%81vagrant%e3%80%81ubuntu%e5%92%8cnode-js%e6%97%b6%e7%aa%81%e7%84%b6%e9%81%87%e5%88%b0%e5%9b%b0%e9%9a%be%e3%80%82\/"},"modified":"2024-01-15T07:07:55","modified_gmt":"2024-01-14T23:07:55","slug":"%e5%9c%a8%e5%ae%89%e8%a3%85mac%e3%80%81vagrant%e3%80%81ubuntu%e5%92%8cnode-js%e6%97%b6%e7%aa%81%e7%84%b6%e9%81%87%e5%88%b0%e5%9b%b0%e9%9a%be%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85mac%e3%80%81vagrant%e3%80%81ubuntu%e5%92%8cnode-js%e6%97%b6%e7%aa%81%e7%84%b6%e9%81%87%e5%88%b0%e5%9b%b0%e9%9a%be%e3%80%82\/","title":{"rendered":"\u5728\u5b89\u88c5Mac\u3001Vagrant\u3001Ubuntu\u548cNode.js\u65f6\u7a81\u7136\u9047\u5230\u56f0\u96be"},"content":{"rendered":"<p>\u8bb0\u5f55\u4e0b\u6765<\/p>\n<p>\u5728Mac\u4e0a\u901a\u8fc7ssh\u8fde\u63a5\u5230Vagrant\u4e0a\u7684ubuntu\uff0c\u5e76\u5728\u5176\u4e0a\u5b89\u88c5node.js\u3002<\/p>\n<pre class=\"post-pre\"><code>vagrant@vagrant-ubuntu-trusty-64:~$ sudo apt install -y nodejs npm\r\nReading package lists... Done\r\nBuilding dependency tree\r\nReading state information... Done\r\nnpm is already the newest version.\r\nnodejs is already the newest version.\r\n0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.\r\n<\/code><\/pre>\n<p>\u5230\u76ee\u524d\u4e3a\u6b62\u4e00\u5207\u987a\u5229\u3002<\/p>\n<pre class=\"post-pre\"><code>vagrant@vagrant-ubuntu-trusty-64:~$  sudo npm install n -g\r\nnpm http GET https:\/\/registry.npmjs.org\/n\r\nnpm http GET https:\/\/registry.npmjs.org\/n\r\nnpm http GET https:\/\/registry.npmjs.org\/n\r\nnpm ERR! Error: CERT_UNTRUSTED\r\nnpm ERR!     at SecurePair.&lt;anonymous&gt; (tls.js:1370:32)\r\nnpm ERR!     at SecurePair.EventEmitter.emit (events.js:92:17)\r\nnpm ERR!     at SecurePair.maybeInitFinished (tls.js:982:10)\r\nnpm ERR!     at CleartextStream.read [as _read] (tls.js:469:13)\r\nnpm ERR!     at CleartextStream.Readable.read (_stream_readable.js:320:10)\r\nnpm ERR!     at EncryptedStream.write [as _write] (tls.js:366:25)\r\nnpm ERR!     at doWrite (_stream_writable.js:223:10)\r\nnpm ERR!     at writeOrBuffer (_stream_writable.js:213:5)\r\nnpm ERR!     at EncryptedStream.Writable.write (_stream_writable.js:180:11)\r\nnpm ERR!     at write (_stream_readable.js:583:24)\r\nnpm ERR! If you need help, you may report this log at:\r\nnpm ERR!     &lt;http:\/\/github.com\/isaacs\/npm\/issues&gt;\r\nnpm ERR! or email it to:\r\nnpm ERR!     &lt;npm-@googlegroups.com&gt;\r\n\r\nnpm ERR! System Linux 3.13.0-165-generic\r\nnpm ERR! command \"\/usr\/bin\/nodejs\" \"\/usr\/bin\/npm\" \"install\" \"n\" \"-g\"\r\nnpm ERR! cwd \/home\/vagrant\r\nnpm ERR! node -v v0.10.25\r\nnpm ERR! npm -v 1.3.10\r\nnpm ERR!\r\nnpm ERR! Additional logging details can be found in:\r\nnpm ERR!     \/home\/vagrant\/npm-debug.log\r\nnpm ERR! not ok code 0\r\n<\/code><\/pre>\n<p>\u53d1\u751f\u9519\u8bef\u5e76\u505c\u6b62\u4e86\u3002<br \/>\n\u5c1d\u8bd5\u641c\u7d22\u201cnpm ERR\uff01\u9519\u8bef\uff1a\u201d<br \/>\n\u4f3c\u4e4e\u9700\u8981\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1anpm config set strict-ssl false\u3002<br \/>\n\u4e0d\u8981\u5fd8\u8bb0\u5728\u5b8c\u6210\u540e\u5c06\u5176\u6062\u590d\u4e3atrue\u3002<\/p>\n<pre class=\"post-pre\"><code>vagrant@vagrant-ubuntu-trusty-64:~$ npm config set strict-ssl false\r\nvagrant@vagrant-ubuntu-trusty-64:~$\r\nvagrant@vagrant-ubuntu-trusty-64:~$  sudo npm install n -g\r\nnpm http GET https:\/\/registry.npmjs.org\/n\r\nnpm http 200 https:\/\/registry.npmjs.org\/n\r\nnpm http GET https:\/\/registry.npmjs.org\/n\/-\/n-2.1.12.tgz\r\nnpm http 200 https:\/\/registry.npmjs.org\/n\/-\/n-2.1.12.tgz\r\n\/usr\/local\/bin\/n -&gt; \/usr\/local\/lib\/node_modules\/n\/bin\/n\r\nn@2.1.12 \/usr\/local\/lib\/node_modules\/n\r\n<\/code><\/pre>\n<p>\u53ea\u8981\u5b8c\u6210\u8fd9\u4e2a\uff0c\u5c31\u53ef\u4ee5\u7ee7\u7eed\u524d\u8fdb\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8bb0\u5f55\u4e0b\u6765 \u5728Mac\u4e0a\u901a\u8fc7ssh\u8fde\u63a5\u5230Vagrant\u4e0a\u7684ubuntu\uff0c\u5e76\u5728\u5176\u4e0a\u5b89\u88c5node.js\u3002 vagran [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-32141","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5728\u5b89\u88c5Mac\u3001Vagrant\u3001Ubuntu\u548cNode.js\u65f6\u7a81\u7136\u9047\u5230\u56f0\u96be - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5728\u5b89\u88c5mac\u3001vagrant\u3001ubuntu\u548cnode-js\u65f6\u7a81\u7136\u9047\u5230\u56f0\u96be\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5728\u5b89\u88c5Mac\u3001Vagrant\u3001Ubuntu\u548cNode.js\u65f6\u7a81\u7136\u9047\u5230\u56f0\u96be\" \/>\n<meta property=\"og:description\" content=\"\u8bb0\u5f55\u4e0b\u6765 \u5728Mac\u4e0a\u901a\u8fc7ssh\u8fde\u63a5\u5230Vagrant\u4e0a\u7684ubuntu\uff0c\u5e76\u5728\u5176\u4e0a\u5b89\u88c5node.js\u3002 vagran [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5728\u5b89\u88c5mac\u3001vagrant\u3001ubuntu\u548cnode-js\u65f6\u7a81\u7136\u9047\u5230\u56f0\u96be\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-26T08:57:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-14T23:07:55+00:00\" \/>\n<meta name=\"author\" content=\"\u9038, \u79d1\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u9038, \u79d1\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85mac%e3%80%81vagrant%e3%80%81ubuntu%e5%92%8cnode-js%e6%97%b6%e7%aa%81%e7%84%b6%e9%81%87%e5%88%b0%e5%9b%b0%e9%9a%be%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85mac%e3%80%81vagrant%e3%80%81ubuntu%e5%92%8cnode-js%e6%97%b6%e7%aa%81%e7%84%b6%e9%81%87%e5%88%b0%e5%9b%b0%e9%9a%be%e3%80%82\/\",\"name\":\"\u5728\u5b89\u88c5Mac\u3001Vagrant\u3001Ubuntu\u548cNode.js\u65f6\u7a81\u7136\u9047\u5230\u56f0\u96be - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2022-07-26T08:57:22+00:00\",\"dateModified\":\"2024-01-14T23:07:55+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/85c1dae56e6ea1e695c73d33c684d487\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85mac%e3%80%81vagrant%e3%80%81ubuntu%e5%92%8cnode-js%e6%97%b6%e7%aa%81%e7%84%b6%e9%81%87%e5%88%b0%e5%9b%b0%e9%9a%be%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85mac%e3%80%81vagrant%e3%80%81ubuntu%e5%92%8cnode-js%e6%97%b6%e7%aa%81%e7%84%b6%e9%81%87%e5%88%b0%e5%9b%b0%e9%9a%be%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85mac%e3%80%81vagrant%e3%80%81ubuntu%e5%92%8cnode-js%e6%97%b6%e7%aa%81%e7%84%b6%e9%81%87%e5%88%b0%e5%9b%b0%e9%9a%be%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5728\u5b89\u88c5Mac\u3001Vagrant\u3001Ubuntu\u548cNode.js\u65f6\u7a81\u7136\u9047\u5230\u56f0\u96be\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/85c1dae56e6ea1e695c73d33c684d487\",\"name\":\"\u9038, \u79d1\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c94f6d9cbbfbca863fab309840bd690c153c95f8490c290ad2ed54dd693dad16?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c94f6d9cbbfbca863fab309840bd690c153c95f8490c290ad2ed54dd693dad16?s=96&d=mm&r=g\",\"caption\":\"\u9038, \u79d1\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/keyi\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85mac%e3%80%81vagrant%e3%80%81ubuntu%e5%92%8cnode-js%e6%97%b6%e7%aa%81%e7%84%b6%e9%81%87%e5%88%b0%e5%9b%b0%e9%9a%be%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5728\u5b89\u88c5Mac\u3001Vagrant\u3001Ubuntu\u548cNode.js\u65f6\u7a81\u7136\u9047\u5230\u56f0\u96be - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u5728\u5b89\u88c5mac\u3001vagrant\u3001ubuntu\u548cnode-js\u65f6\u7a81\u7136\u9047\u5230\u56f0\u96be\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5728\u5b89\u88c5Mac\u3001Vagrant\u3001Ubuntu\u548cNode.js\u65f6\u7a81\u7136\u9047\u5230\u56f0\u96be","og_description":"\u8bb0\u5f55\u4e0b\u6765 \u5728Mac\u4e0a\u901a\u8fc7ssh\u8fde\u63a5\u5230Vagrant\u4e0a\u7684ubuntu\uff0c\u5e76\u5728\u5176\u4e0a\u5b89\u88c5node.js\u3002 vagran [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5728\u5b89\u88c5mac\u3001vagrant\u3001ubuntu\u548cnode-js\u65f6\u7a81\u7136\u9047\u5230\u56f0\u96be\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-07-26T08:57:22+00:00","article_modified_time":"2024-01-14T23:07:55+00:00","author":"\u9038, \u79d1","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u9038, \u79d1","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85mac%e3%80%81vagrant%e3%80%81ubuntu%e5%92%8cnode-js%e6%97%b6%e7%aa%81%e7%84%b6%e9%81%87%e5%88%b0%e5%9b%b0%e9%9a%be%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85mac%e3%80%81vagrant%e3%80%81ubuntu%e5%92%8cnode-js%e6%97%b6%e7%aa%81%e7%84%b6%e9%81%87%e5%88%b0%e5%9b%b0%e9%9a%be%e3%80%82\/","name":"\u5728\u5b89\u88c5Mac\u3001Vagrant\u3001Ubuntu\u548cNode.js\u65f6\u7a81\u7136\u9047\u5230\u56f0\u96be - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2022-07-26T08:57:22+00:00","dateModified":"2024-01-14T23:07:55+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/85c1dae56e6ea1e695c73d33c684d487"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85mac%e3%80%81vagrant%e3%80%81ubuntu%e5%92%8cnode-js%e6%97%b6%e7%aa%81%e7%84%b6%e9%81%87%e5%88%b0%e5%9b%b0%e9%9a%be%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85mac%e3%80%81vagrant%e3%80%81ubuntu%e5%92%8cnode-js%e6%97%b6%e7%aa%81%e7%84%b6%e9%81%87%e5%88%b0%e5%9b%b0%e9%9a%be%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85mac%e3%80%81vagrant%e3%80%81ubuntu%e5%92%8cnode-js%e6%97%b6%e7%aa%81%e7%84%b6%e9%81%87%e5%88%b0%e5%9b%b0%e9%9a%be%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5728\u5b89\u88c5Mac\u3001Vagrant\u3001Ubuntu\u548cNode.js\u65f6\u7a81\u7136\u9047\u5230\u56f0\u96be"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/85c1dae56e6ea1e695c73d33c684d487","name":"\u9038, \u79d1","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c94f6d9cbbfbca863fab309840bd690c153c95f8490c290ad2ed54dd693dad16?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c94f6d9cbbfbca863fab309840bd690c153c95f8490c290ad2ed54dd693dad16?s=96&d=mm&r=g","caption":"\u9038, \u79d1"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/keyi\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85mac%e3%80%81vagrant%e3%80%81ubuntu%e5%92%8cnode-js%e6%97%b6%e7%aa%81%e7%84%b6%e9%81%87%e5%88%b0%e5%9b%b0%e9%9a%be%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/32141","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=32141"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/32141\/revisions"}],"predecessor-version":[{"id":57230,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/32141\/revisions\/57230"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=32141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=32141"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=32141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}