brew安装postgresql报错“No such file or directory @ rb_sysopen...”

brew安装postgresql报错“No such file or directory @ rb_sysopen...”

1. 现象

执行 brew install postgresql时报错“No such file or directory @ rb_sysopen …”
请添加图片描述

2. 解决方案

用 brew 单独下载依赖包 openssl@1.1

brew install openssl@1.1

请添加图片描述

3. 验证

再次执行 postgresql 的安装命令,成功!

(ll_env) chengrui@chengruis-MacBook-Air learning_log % brew install postgresql 
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/krb5-1.19.3
Already downloaded: /Users/chengrui/Library/Caches/Homebrew/downloads/0255cb72987b98c06ce7e4dfee44fd76588ea5c718ba6ff6bcf19a43f3684d48--krb5-1.19.3.arm64_monterey.bottle.tar.gz
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/readline-8.
Already downloaded: /Users/chengrui/Library/Caches/Homebrew/downloads/39a84bfc99390b41af3e6aa9252a345e71111216ca4365ac1356c989d9b5994e--readline-8.1.2.arm64_monterey.bottle.tar.gz
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/postgresql-
Already downloaded: /Users/chengrui/Library/Caches/Homebrew/downloads/a35a60439201db3723c0842db62b3368de4fafdedcde41a5dfb642232f32fb20--postgresql-14.2_1.arm64_monterey.bottle.tar.gz
==> Installing dependencies for postgresql: krb5 and readline
==> Installing postgresql dependency: krb5
==> Pouring krb5-1.19.3.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/krb5/1.19.3: 162 files, 5.6MB
==> Installing postgresql dependency: readline
==> Pouring readline-8.1.2.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/readline/8.1.2: 48 files, 1.7MB
==> Installing postgresql
==> Pouring postgresql-14.2_1.arm64_monterey.bottle.tar.gz
==> /opt/homebrew/Cellar/postgresql/14.2_1/bin/initdb --locale=C -E UTF-8 /opt/h
==> Caveats
To migrate existing data from a previous major version of PostgreSQL run:
  brew postgresql-upgrade-database

This formula has created a default database cluster with:
  initdb --locale=C -E UTF-8 /opt/homebrew/var/postgres
For more details, read:
  https://www.postgresql.org/docs/14/app-initdb.html

To restart postgresql after an upgrade:
  brew services restart postgresql
Or, if you don't want/need a background service you can just run:
  /opt/homebrew/opt/postgresql/bin/postgres -D /opt/homebrew/var/postgres
==> Summary
🍺  /opt/homebrew/Cellar/postgresql/14.2_1: 3,305 files, 44.9MB
==> Running `brew cleanup postgresql`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Caveats
==> postgresql
To migrate existing data from a previous major version of PostgreSQL run:
  brew postgresql-upgrade-database

This formula has created a default database cluster with:
  initdb --locale=C -E UTF-8 /opt/homebrew/var/postgres
For more details, read:
  https://www.postgresql.org/docs/14/app-initdb.html

To restart postgresql after an upgrade:
  brew services restart postgresql
Or, if you don't want/need a background service you can just run:
  /opt/homebrew/opt/postgresql/bin/postgres -D /opt/homebrew/var/postgres
  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值