The build process went fine but it couldn't find the libpq library when actually used. Using pg_config output for ldflags seems to fix it.
Error: Shared object "libpq.so.5" not found, required by "addon.node"
at Object.Module._extensions..node (module.js:682:18)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at bindings (/home/edho-mastodon/mastodon/node_modules/bindings/bindings.js:76:44)
at Object.<anonymous> (/home/edho-mastodon/mastodon/node_modules/libpq/index.js:1:108)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
/home/edho-mastodon/mastodon/node_modules/bindings/bindings.js:83
throw e
^
The build process went fine but it couldn't find the libpq library when actually used. Using
pg_config
output forldflags
seems to fix it.pg_config
: