【发布时间】:2016-01-14 19:25:23
【问题描述】:
在 El Capitan 上通过 homebrew 安装 postgresql 9.5 后,我尝试运行 initdb /usr/local/var/postgres,但我得到以下信息:
The files belonging to this database system will be owned by user "kyledecot".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /usr/local/var/postgres ... initdb: could not change permissions of directory "/usr/local/var/postgres": Operation not permitted
当尝试cd /usr/local/var/postgres 我得到:
cd: permission denied: /usr/local/var/postgres
我似乎没有执行此操作的适当权限。我认为这与 El Capitan 的 System Integrity Protection 有关,但我可能是错的。
我该如何解决这个问题?
【问题讨论】:
标签: macos postgresql osx-elcapitan