【问题标题】:Centos 6.6 postgresql error: cannot execute binary fileCentos 6.6 postgresql 错误:无法执行二进制文件
【发布时间】:2015-05-23 09:53:08
【问题描述】:

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

感谢大家的帮助。

【问题讨论】:

  • 请给我一个例子。我跑了su -c postgres /usr/bin/psql,但我不工作。

标签: bash postgresql centos6


【解决方案1】:

试试这个:

PSQL='/usr/bin/psql'
su - postgres -c "$PSQL template1 -f 'sql.sql'"

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-04-22
    • 1970-01-01
    相关资源
    最近更新 更多