Mac OS -bash: psql: command not found 使用 psql 命令报错

使用 psql 在 mac os 系统上登录,系统显示没有 psql 这个命令存在

 

 

解决方法如下:

将 postgresql 的 bin 目录添加到环境变量中即可

export PATH="/Applications/Postgres.app/Contents/Versions/9.5/bin:$PATH"

 

参考链接:

https://stackoverflow.com/questions/20928734/how-to-put-psql-on-the-path-when-using-postgres-app-on-os-x?rq=1

posted @ 2019-07-23 01:10  Ryan_zheng  阅读(6636)  评论(0编辑  收藏  举报