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

相关推荐
楚轩努力变强6 小时前
iOS 自动化环境配置指南 (Appium + WebDriverAgent)
javascript·学习·macos·ios·appium·自动化
猫头虎1 天前
如何解决 OpenClaw “Pairing required” 报错:两种官方解决方案详解
网络·windows·网络协议·macos·智能路由器·pip·scipy
皮卡车厘子2 天前
Mac 挂载目录
macos
良逍Ai出海2 天前
在 Windows & macOS 上安装 Claude Code,并使用第三方 Key 的完整教程
windows·macos
热爱生活的五柒2 天前
linux/mac/wsl如何使用claude code,并配置免费的硅基流动API?(官方的需要付费订阅)
linux·运维·macos
胖胖大王叫我来巡山2 天前
mac本地安装DataEase桌面版
macos
奋斗者1号2 天前
OpenClaw 部署方式对比:云端、WSL、Mac 本机、Ubuntu 虚拟机(2026年2月最新主流实践)
linux·ubuntu·macos
玉梅小洋2 天前
Android SDK 安装指南(MacOS 和 Windows)
android·windows·macos·sdk
2501_916007472 天前
没有 Mac 用户如何上架 App Store,IPA生成、证书与描述文件管理、跨平台上传
android·macos·ios·小程序·uni-app·iphone·webview
胖胖大王叫我来巡山2 天前
Mac通过源码安装部署SQLBOT
macos