Skip to content

Installation Instructions

Amitosh Swain Mahapatra edited this page Mar 18, 2017 · 18 revisions

bcrypt is a native module for NodeJS, i.e, it uses native code to perform its work. The advantage of this over pure JS alternatives is speed. However, the disadvantage of this approach is it requires you to install a compiler and build dependencies in order to build.

We try to offer pre-built libraries for some platforms, but they are not always readily available since we developers do not own machines in all the architectures we work on. Pre-compiled libraries for Windows, Linux and MacOS should be available and installed automatically by node-pre-gyp while installing bcrypt. However, if you are willing to contribute to this library or simply, the pre-compiled libraries are not yet available, you need to follow the instructions on this page.

The instructions in this page are not exhaustive and do not cover all platforms and distributions. If you get bcrypt installed on a platform not listed here, please edit this page and add your steps.

Linux

Linux machines come with a large variety of flavors and distributions. We only have instructions for the most commonly used distributions. However, you are welcome to contribute instructions for your distribution.

Ubuntu (and derivatives - Elementary, Linux Mint etc.)

Tested on:

  • Ubuntu 16.04.2 "Xenial Xerus" x64 (fresh install on AWS, Digital Ocean, Ubuntu Server ISO, Ubuntu desktop)
  • Elementary OS 0.4 "Loki" x64 (based on Ubuntu 16.04.1)
  • build-essential - In order to install a compiler chain to compile the node modules.
  • python (for server images, desktop images come with python installed) - 16.04 server defaults to python 3 so does not come with python 2. However, node-gyp requires python to be installed.

This one liner should make sure all dependencies installed:

sudo apt-get install -y build-essential python
Clone this wiki locally