简体   繁体   English

在清理安装后,PostgreSQL“无法访问服务器配置文件(...)没有这样的文件或目录”

[英]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.

相关问题 chmod:无法访问'\\ r':没有这样的文件或目录 - chmod: cannot access ‘\r’: No such file or directory linux execvp; ls无法访问|,没有这样的文件或目录 - linux execvp ; ls cannot access |, No such file or directory ls: 无法访问 'PATH=./': 没有这样的文件或目录 - ls: cannot access 'PATH=./': No such file or directory Doxygen make make install错误:无法统计“示例”:没有这样的文件或目录 - Doxygen make make install Error : cannot stat ‘examples’: No such file or directory 尝试在npm install -g之后运行时没有这样的文件或目录 - No such file or directory when trying to run after npm install -g 例外:null。 flutter 工具无法访问文件或目录 - Exception: null. The flutter tool cannot access the file or directory 创建目录的tar.gz并清理除文件以外的目录? - create a tar.gz of a directory and clean up the directory except a file? 让 Java 可以访问 ubuntu 服务器中的目录/文件 - let Java have access to a directory/file in ubuntu server postgresql:数据目录无效 | 启动后无法打开 PID 文件 /var/run/postgresql/10-main.pid(还没有?):没有这样的文件或目录 - postgresql: Invalid data directory | Can't open PID file /var/run/postgresql/10-main.pid (yet?) after start: No such file or directory 如何避免“没有这样的文件或目录”错误的`make clean` Makefile目标 - How to avoid “No such file or directory” Error for `make clean` Makefile target
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM