gpt4 book ai didi

Haskell Stack 不在 Nixos 上构建 postgresql-libpq

转载 作者:行者123 更新时间:2023-12-02 18:39:49 24 4
gpt4 key购买 nike

postgresql-libpq添加到我的项目的cabal文件后,堆栈构建失败,并显示以下内容:

Configuring postgresql-libpq-0.9.1.1...
setup: The program 'pg_config' is required but it could not be found.

我在 Nixos 上,pg_config 已安装并位于我的路径中:

$ whereis pg_config
pg_config: /nix/store/5bc6hzqkyw8dpi91sqznd3ik42mllwyz-system-path/bin/pg_config

我使用的是堆栈 1.0.2,即使在不稳定 channel 上执行 nixos-rebuild switch --upgrade 后,它似乎也不会更新。这是我的错误还是其他原因?

最佳答案

我在 nixos 上的 stack 上遇到了这个问题,当我的 stack.yaml 的 nix block 更改为以下内容时,我就解决了这个问题。

nix:
pure: true
enable: true
packages: [ postgresql ]

关于Haskell Stack 不在 Nixos 上构建 postgresql-libpq,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39603903/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com