在NixOS中使用PostgreSQL遇连接错误,需修改configuration.nix吗?
PostgreSQL连接错误问题求助
我已通过以下命令安装PostgreSQL:
nix-env -iA nixos.postgresql
但使用psql时出现如下错误:
psql: error: connection to server on socket "/run/postgresql/.s.PGSQL.5432" failed: No such file or directory Is the server running locally and accepting connections on that socket?
请问是否需要在/etc/nixos/configuration.nix中添加相关配置?
更新
我尝试改用nix-shell而非nix-env的方式安装,操作后仍出现类似错误:
$ nix-shell --pure shell.nix done server started $ psql psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/mnt/c/Users/Pierre-Olivier/nix/psql/.pg/.s.PGSQL.5432"?
内容的提问来源于stack exchange,提问作者Pierre-olivier Gendraud
相关产品推荐
相关产品推荐

