Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Haskell堆栈生成错误:在生成包postgresql-libpq-0.9.4.3时_Postgresql_Ubuntu_Haskell - Fatal编程技术网

Haskell堆栈生成错误:在生成包postgresql-libpq-0.9.4.3时

Haskell堆栈生成错误:在生成包postgresql-libpq-0.9.4.3时,postgresql,ubuntu,haskell,Postgresql,Ubuntu,Haskell,我将-postgresql simple添加到Haskell stack项目的包.yaml的依赖项中,然后进行堆栈构建,得到: While building package postgresql-libpq-0.9.4.3 (scroll up to its section to see the error) using: /tmp/stack-89da86d626e343e1/postgresql-libpq-0.9.4.3/.stack-work/dist/x86_64-linu

我将
-postgresql simple
添加到Haskell stack项目的
包.yaml的依赖项中,然后进行
堆栈构建
,得到:

While building package postgresql-libpq-0.9.4.3 (scroll up to its section to see the error) using:
      /tmp/stack-89da86d626e343e1/postgresql-libpq-0.9.4.3/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/setup/setup --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0 configure --user --package-db=clear --package-db=global --package-db=/root/.stack/snapshots/x86_64-linux-tinfo6/08a30a38364a81e94295cf97609a35ddfc240f67779f06f0eb2ce22d8a89e805/8.10.4/pkgdb --libdir=/root/.stack/snapshots/x86_64-linux-tinfo6/08a30a38364a81e94295cf97609a35ddfc240f67779f06f0eb2ce22d8a89e805/8.10.4/lib --bindir=/root/.stack/snapshots/x86_64-linux-tinfo6/08a30a38364a81e94295cf97609a35ddfc240f67779f06f0eb2ce22d8a89e805/8.10.4/bin --datadir=/root/.stack/snapshots/x86_64-linux-tinfo6/08a30a38364a81e94295cf97609a35ddfc240f67779f06f0eb2ce22d8a89e805/8.10.4/share --libexecdir=/root/.stack/snapshots/x86_64-linux-tinfo6/08a30a38364a81e94295cf97609a35ddfc240f67779f06f0eb2ce22d8a89e805/8.10.4/libexec --sysconfdir=/root/.stack/snapshots/x86_64-linux-tinfo6/08a30a38364a81e94295cf97609a35ddfc240f67779f06f0eb2ce22d8a89e805/8.10.4/etc --docdir=/root/.stack/snapshots/x86_64-linux-tinfo6/08a30a38364a81e94295cf97609a35ddfc240f67779f06f0eb2ce22d8a89e805/8.10.4/doc/postgresql-libpq-0.9.4.3 --htmldir=/root/.stack/snapshots/x86_64-linux-tinfo6/08a30a38364a81e94295cf97609a35ddfc240f67779f06f0eb2ce22d8a89e805/8.10.4/doc/postgresql-libpq-0.9.4.3 --haddockdir=/root/.stack/snapshots/x86_64-linux-tinfo6/08a30a38364a81e94295cf97609a35ddfc240f67779f06f0eb2ce22d8a89e805/8.10.4/doc/postgresql-libpq-0.9.4.3 --dependency=Cabal=Cabal-3.2.1.0 --dependency=base=base-4.14.1.0 --dependency=bytestring=bytestring-0.10.12.0 --dependency=unix=unix-2.7.2.2 -f-use-pkg-config --exact-configuration --ghc-option=-fhide-source-paths
    Process exited with code: ExitFailure 1
容器已按如下方式安装protgresql:

RUN apt-get update && apt-get install -y wget lsb-release

RUN sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -

RUN apt-get update && apt-get -y install postgresql
并且
pg_config
工作正常

即使它说
向上滚动到它的部分以查看错误
,上面也没有错误

postgresql-libpq > Configuring postgresql-libpq-0.9.4.3...
postgresql-libpq > setup: Missing dependency on a foreign library:
postgresql-libpq > * Missing (or bad) C library: pq
postgresql-libpq > This problem can usually be solved by installing the system package that
postgresql-libpq > provides this library (you may need the "-dev" version). If the library is
postgresql-libpq > already installed but in a non-standard location then you can use the flags
postgresql-libpq > --extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the
postgresql-libpq > library file does exist, it may contain errors that are caught by the C
postgresql-libpq > compiler at the preprocessing stage. In this case you can re-run configure
postgresql-libpq > with the verbosity flag -v3 to see the error messages.
这是在最顶端的日志

在阅读了这篇文章并执行了
sudoapt安装-y libpq dev
之后,然后
堆栈构建
再次运行