[英]initdb for postgresql on os x fails
Having trouble installing postgres 10 on my Mac, version 10.12.5.在我的 Mac 版本 10.12.5 上安装 postgres 10 时遇到问题。
I've tried installing 2 ways:我试过安装两种方式:
(1) Downloading Postgres.app
(2) `brew install postgresql`
and tried to manually run a bunch of variations of these commands for initdb
:并尝试为initdb
手动运行这些命令的一系列变体:
$ initdb /Applications/Postgres.app/Contents/Versions/latest/bin/ver-10
$ initdb /usr/local/var/postgres -E utf8
All yield the same error FATAL: could not create semaphores: Invalid argument
.全部产生相同的错误FATAL: could not create semaphores: Invalid argument
。
Full trace:完整跟踪:
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"
I'm not sure what FATAL: could not create semaphores: Invalid argument
means.我不确定FATAL: could not create semaphores: Invalid argument
是什么意思。 I've seen a lot of other answers related to insufficient space, but not this one.我已经看到了很多与空间不足有关的其他答案,但不是这个。
Thanks in advance!提前致谢!
我必须删除通过 Brew 安装的 Postgres,然后重新安装 Postgres.app,然后重新启动计算机,然后打开应用程序并单击“初始化”修复它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.