Search code examples
macosngrok

How can I install ngrok on OS X El Capitan?


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.


Solution

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

    npm install ngrok -g
    

    For more information visit check this page.