Bash Centos 6.6 postgresql错误:无法执行二进制文件

Bash Centos 6.6 postgresql错误:无法执行二进制文件,bash,postgresql,centos6,Bash,Postgresql,Centos6,我在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/bi

我在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'"

请给我举个例子。我运行了
su-cpostgres/usr/bin/psql
,但没有工作。