bash - Centos 6.6 postgresql错误: cannot execute binary file

标签 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/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/

相关文章:

oracle10g - 从 OS X 连接到 Vagrant box 上的 Oracle

bash - 如何启动具有多个运行各种程序的选项卡的 KDE 控制台?

linux - 使用 netcat 和 UDP 的反向 shell 不工作

ruby-on-rails - Rails EXCEPT 查询(过滤出联合表中存在的记录)

postgresql - postgres jsonb_set 多键更新

linux - OpenLDAP 错误 : entry -1 has no dn Slaptest won't work

java - 有没有一种方法可以使用 Cygwin 运行 shell 脚本并对 java 命令使用正确的路径分隔符

linux - Bash Shell 脚本嵌套循环的内部循环不起作用

sql-server - 替代 PostgreSQL 中的 SQL Server sys 对象

mysql - 在 Google Compute Engine 上的 CentOS 6.6 上安装 MySQL 的正确方法是什么?