The ones I found seems to be out of date. https://github.com/input-output-hk/cardano-db-sync/blob/master/doc/building-running.md

Warning: Requested index-state 2021-07-02T00:00:00Z is newer than
    'hackage.haskell.org'! Falling back to older state (2021-07-01T22:06:28Z).
    Resolving dependencies...
    cabal: Could not resolve dependencies:
    [__0] trying: Win32-network- (user goal)
    [__1] trying: base- (dependency of Win32-network)
    [__2] trying: byron-spec-chain- (user goal)
    [__3] trying: microlens-th- (dependency of byron-spec-chain)
    [__4] trying: template-haskell- (dependency of
    [__5] trying: pretty- (dependency of
    [__6] trying: hedgehog-1.0.5 (dependency of byron-spec-chain)
    [__7] trying: time-1.9.3/installed-1.9.3 (dependency of hedgehog)
    [__8] trying: text- (dependency of hedgehog)
    [__9] trying: cardano-api-1.29.0 (user goal)
    [_10] trying: scientific- (dependency of cardano-api)
    [_11] trying: aeson- (dependency of cardano-api)
    [_12] trying: cardano-db-11.0.0 (user goal)
    [_13] trying: postgresql-simple-0.6.4 (dependency of cardano-db)
    [_14] trying: postgresql-libpq- (dependency of postgresql-simple)
    [_15] rejecting: postgresql-libpq:-use-pkg-config (constraint from config
    file, command line flag, or user target requires opposite flag selection)
    [_15] rejecting: postgresql-libpq:+use-pkg-config (conflict: pkg-config
    package libpq>=9.3, not found in the pkg-config database)
    [_15] fail (backjumping, conflict set: postgresql-libpq,
    After searching the rest of the dependency tree exhaustively, these were the
    goals I've had most trouble fulfilling: postgresql-simple, base,
    postgresql-libpq, aeson, text, time, postgresql-libpq:use-pkg-config,
    scientific, cardano-db, cardano-api, hedgehog, pretty, template-haskell,
    byron-spec-chain, microlens-th, Win32-network
    Try running with --minimize-conflict-set to improve the error message.
  • It looks like you are missing the libpq-dev package. Commented Jan 15 at 19:27

2 Answers 2


nix-build! :-)

Specifically, this line in the linked docs:

nix-build -A cardano-db-sync -o db-sync-node

Nix as suggest by @sorki is one solution.

Another is to install the development versions of the libraries:

sudo apt install pkg-config libpq-dev

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.