initdb is failing on Centos 7 with 10.4 because the install procedure does not change the ownership of the /usr/local/pgsql directory to postgres. Changing the ownership fixes the problem, but the install procedure should do this.
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных