mac中按照官网教程安装了 pgsql 报错 command not found: psql

问题描述

问题解决

1、确认 PostgreSQL 的安装路径:

查找 PostgreSQL 的安装路径官方安装包通常会将 PostgreSQL 安装在 /Library/PostgreSQL/17/bin目录下

2、添加路径到 shell 配置文件
  • 如果你是使用 bash,可以运行:
    vim ~/.bash_profile
  • 如果你使用 zsh(macOS Catalina及更高版本的默认 shell):
    vim ~/.zshrc

最后一行加上

复制代码
export PATH="/Library/PostgreSQL/17/bin:$PATH"
3、重新加载配置文件:
  • 对于 bash:

    source ~/.bash_profile

  • 对于 zsh:

    source ~/.zshrc

相关推荐
共享家95273 小时前
linux-数据链路层
linux·网络·macos
CZIDC13 小时前
MacOS字体看起来比在 Windows 上更好?
macos
Cosmoshhhyyy20 小时前
linux远程部署dify和mac本地部署dify
linux·运维·macos
行星00820 小时前
mac 通过homebrew 安装和使用nvm
macos·npm·node.js
2501_928094651 天前
Mac电脑录屏工具 Omi录屏专家(Mac中文)
macos·mac·录屏工具·omi
森之鸟1 天前
Mac chrome浏览器下载DevEco Studio 6.0.0 Beta2失败
前端·chrome·macos
FairGuard手游加固2 天前
版本更新!FairGuard-Mac加固工具已上线!
macos
金玉满堂@bj2 天前
OS设备UDID查看方法
macos·objective-c·cocoa
庸懒2 天前
Electron自定义菜单栏及Mac最大化无效的问题解决
前端·macos·electron