[英]PostgreSQL “cannot access the server configuration file (…) No such file or directory” after clean install
I just installed postgresql according to the official documentation : But for some reason it doesn't work. 我刚刚根据官方文档安装了postgresql:但由于某种原因它不起作用。 It did install using sudo apt-get postgres... etc. But the starting of the server doesn't seem to work.
它确实安装使用sudo apt-get postgres ...等。但服务器的启动似乎不起作用。
I tried starting the server according to their documentation but mr. 我尝试根据他们的文档启动服务器,但先生。 computer throws the following error to my head when entering this command:
输入此命令时,计算机会将以下错误抛到脑后:
Command: 命令:
user@user-noobcomputer:/usr/lib/postgresql/9.4$ bin/postgres -D /usr/local/pgsql/data/
Error: 错误:
postgres cannot access the server configuration file "/usr/local/pgsql/data/postgresql.conf": No such file or directory"
I have no clue why this file doesn't exist. 我不知道为什么这个文件不存在。 Can anyone help me find out how to get past this error message and get my postgres server up and running?
任何人都可以帮我找出如何通过这个错误信息,让我的postgres服务器启动并运行?
First make sure that the file is not installed. 首先确保未安装该文件。 As super user update the mlocate database and then run an mlocate query for the file.
当超级用户更新mlocate数据库,然后为该文件运行mlocate查询。
$updatedb
$locate postgresql.conf
this will return any file with that name in your system. 这将返回系统中具有该名称的任何文件。 If the file is located in the wrong folder, then it'll show up in that query.
如果文件位于错误的文件夹中,则它将显示在该查询中。
If not, may try going to PostgreSQL docs they have a basic example of how this file would look. 如果没有,可以尝试去PostgreSQL文档,他们有一个基本的例子来说明这个文件的外观。 Try making a copy of the file with that setting.
尝试使用该设置制作文件的副本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.