我在 centos 6.6 上运行
PSQL='/usr/bin/psql'
su - postgres "$PSQL" template1 -f 'sql.sql'
但是启动psql总是启动失败
Starting postgresql-9.4 service: [FAILED]
然后我收到此错误
/usr/bin/psql: /usr/bin/psql: cannot execute binary file
感谢您的所有帮助。
最佳答案
试试这个:
PSQL='/usr/bin/psql'
su - postgres -c "$PSQL template1 -f 'sql.sql'"
关于bash - Centos 6.6 postgresql错误: cannot execute binary file,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29158898/