我正在跟随最近的RailsCast设置PostgreSQL,但是我无法运行initdb /usr/local/var/postgres
命令。每次运行它时,都会出现以下错误:
The files belonging to this database system will be owned by user "Construct".
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".
creating directory /usr/local/var/postgres ... initdb: could not create directory "/usr/local/var": Permission denied