在升级到小牛后,Postgresql开始播放,每当我调用pg_restore而不调用完整路径时,会发出此错误消息:
pg_restore: command not found
如果我指定了完整的路径,它是有效的,但这显然不是最佳的:
/Applications/Postgres93.app/Contents/MacOS/bin/pg_restore --verbose --clean --no-acl --no-owner -h localhost -U steven -d db/testivate_development $file_path
要解决这个问题,我已经尝试删除所有版本的Postgresql(与Homebrew),然后安装Postgres.app.你可以确认这样做是这样的:
$sudo find / -name pg_restore /Applications/Postgres93.app/Contents/MacOS/bin/pg_restore find: /dev/fd/3: Not a directory find: /dev/fd/4: Not a directory
要将Postgresql添加到我的路径,我尝试将以下每行添加到〜/ .bash_profile,〜/ bashrc和〜/ .zshrc中,每次尝试后重新启动:
export PATH="/Applications/Postgres.app/Contents/MacOS/bin:$PATH"
…根据postgresapp.com文档,然后…
export PATH="/Applications/Postgres93.app/Contents/MacOS/bin:$PATH"
…根据下面的评论.
这些都没有解决我的问题.
尝试将此行添加到.bash_profile中:
export PATH="/Applications/Postgres93.app/Contents/MacOS/bin:$PATH"
并删除或注释掉以前的引用.
原文地址:https://www.jb51.cc/postgresql/192557.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。