繁体   English   中英

os x 上 postgresql 的 initdb 失败

[英]initdb for postgresql on os x fails

在我的 Mac 版本 10.12.5 上安装 postgres 10 时遇到问题。

我试过安装两种方式:

(1) Downloading Postgres.app
(2) `brew install postgresql`

并尝试为initdb手动运行这些命令的一系列变体:

$ initdb /Applications/Postgres.app/Contents/Versions/latest/bin/ver-10
$ initdb /usr/local/var/postgres -E utf8

全部产生相同的错误FATAL: could not create semaphores: Invalid argument

完整跟踪:

The files belonging to this database system will be owned by user "foo".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.UTF-8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /usr/local/var/postgres ... ok
creating subdirectories ... ok
selecting default max_connections ... 10
selecting default shared_buffers ... 400kB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... 2018-03-12 20:49:58.654 PDT [98144] FATAL:  could not create semaphores: Invalid argument
2018-03-12 20:49:58.654 PDT [98144] DETAIL:  Failed system call was semget(1, 17, 03600).
child process exited with exit code 1
initdb: removing contents of data directory "/usr/local/var/postgres"

我不确定FATAL: could not create semaphores: Invalid argument是什么意思。 我已经看到了很多与空间不足有关的其他答案,但不是这个。

提前致谢!

我必须删除通过 Brew 安装的 Postgres,然后重新安装 Postgres.app,然后重新启动计算机,然后打开应用程序并单击“初始化”修复它。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM