Troubleshoot nodegit

Antora interfaces with git repositories using nodegit. During installation of the site generator, Antora pulls in nodegit as a dependency and installs it automatically. If your Antora installation fails, nodegit is the most probable culprit.

nodegit and Linux

The nodegit dependency may fail on certain Linux distributions when you attempt to install the default Antora site generator.

When the nodegit dependency fails, you’ll see the following error output to you terminal.

Error: cannot open shared object file: No such file or directory

This is an open issue in nodegit. See nodegit#1246.

If you see this error, you either need to create the missing symlink or force nodegit to be recompiled instead of using a precompiled binary. If you’re using Alpine Linux, you must force nodegit to recompile.

To create the missing symlink, run the following command:

$ sudo ln -s /usr/lib64/ /usr/lib64/

If that fails, run:

$ sudo ln -s /usr/lib/ /usr/lib/

Once you’ve made that symlink, run the npm install command to install the site generator.

$ npm install -g @antora/site-generator-default

Option 2: Recompile nodegit

If you aren’t comfortable making a system-wide change, or you’re on Alpine Linux, you can recompile nodegit on your machine instead.

Force nodegit to recompile by passing the BUILD_ONLY environment variable to the npm install command.

$ BUILD_ONLY=true npm install -g @antora/site-generator-default

Be aware that recompiling nodegit will make installation take considerably longer.

What’s next?

Now that the default Antora site generator is installed, you are ready to: