【问题标题】:How can I install ngrok on OS X El Capitan?如何在 OS X El Capitan 上安装 ngrok?
【发布时间】:2018-05-02 20:39:09
【问题描述】:

首先我尝试从网站下载 ngrok-stable-darwin-amd64.zip。当我尝试通过终端解压缩时,我得到:

Archive:  /Users/User/Downloads/ngrok-stable-darwin-amd64.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /Users/User/Downloads/ngrok-stable-darwin-amd64.zip or
        /Users/User/Downloads/ngrok-stable-darwin-amd64.zip.zip, and cannot find /Users/User/Downloads/ngrok-stable-darwin-amd64.zip.ZIP, period.

使用 Unarchiver 解压缩响应:

读取文件内容时出现问题 “ngrok-stable-darwin-amd64.zip”:数据已损坏

尝试了自制路线brew cask install ngrok,但无济于事:

==> Downloading https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-darwin-amd64.z
#####                                                                      7.0%
curl: (56) SSLRead() return error -9806
Error: Download failed on Cask 'ngrok' with message: Download failed: https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-darwin-amd64.zip
The incomplete download is cached at /Users/User/Library/Caches/Homebrew/Cask/ngrok--2.1.3,4VmDzA7iaHb.zip.incomplete

我正在尝试启用Vagrant share。为什么我不能安装 ngrok,或者更重要的是,我该怎么做?

请,谢谢。

【问题讨论】:

    标签: macos ngrok


    【解决方案1】:

    您可以将 ngrok 安装为全局 npm 包。试试这个:

    npm install ngrok -g
    

    欲了解更多信息,请访问this page

    【讨论】:

    • 惊人的成功!谢谢阿克谢!!我还没有测试 Vagrant 的份额,但这绝对是朝着正确方向迈出的一步
    • @user163831如果它对你有用,别忘了把它标记为正确答案:)
    • 感谢为我工作。尝试通过brew cask install ngrok 安装时遇到问题,这很好用!
    猜你喜欢
    • 1970-01-01
    • 2017-01-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-05
    • 1970-01-01
    相关资源
    最近更新 更多