How can I install ngrok on OS X El Capitan?

孤街浪徒 提交于 2020-01-15 11:07:50

问题


First I tried downloading from the website, ngrok-stable-darwin-amd64.zip. When I try unzipping via Terminal, I get:

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.

Unzipping with Unarchiver responds with:

There was a problem while reading the contents of the file "ngrok-stable-darwin-amd64.zip": Data is corrupted

Tried the homebrew route, brew cask install ngrok, to no avail:

==> 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

I'm trying to enable Vagrant share. Why can't I install ngrok, or more importantly, how can I?

Please & thanks.


回答1:


You can install ngrok as a global npm package. Try this:

npm install ngrok -g

For more information visit check this page.



来源:https://stackoverflow.com/questions/47378263/how-can-i-install-ngrok-on-os-x-el-capitan

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!