What To Do If SQLite3 Does Not Compile

Ghost, by default, relies on SQLite3 for storing all content. When installing Ghost with npm install --production, npm looks through the package.json file included with Ghost to see what needs to be installed. In the package.json file, SQLite3 is listed as a dependency. The group behind SQLite3 has pre built the SQLite3 binary on many popular architectures so that it does not have to be compiled during the Ghost install. During our tests on CentOS, Ubuntu, Mac OS X, and Windows we have found that there is a pre built binary.

If you are installing Ghost and see a message that the SQLite3 binary could "not found, falling back to source compile", you are attempting to install Ghost on a computer that the SQLite3 team has not precompiled the source code for. The full error message that you will see will look like this:

The Quick Fix

To not have to wait for the SQLite3 team to build a binary for your environment, you can force SQLite3 to compile. To do that run sqlite3 --build-from-source. You will need tools installed in your operating system for compiling software like gcc before being able to run sqlite3 --build-from-source.

I would suggest letting the SQLite3 team know by following their instructions here. They will want to know details about what operating system, hardware architecture, version of Node.js etc.