我本来想开始做psql个,但结果失败了

psql: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

当我使用postgres -D /usr/local/var/postgres时,出现以下错误:

dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.63.dylib
  Referenced from: /usr/local/bin/postgres
  Reason: image not found
[1]    2559 abort      postgres -D /usr/local/var/postgres

libicui18n.63.dylib的快速搜索显示我需要icu4c个版本为63的lib.但是brew list icu4c说我有64.2版.

我try 了brew install icu4c 63brew install icu4c 63brew install icu4c@63但是运气不好.

有人能帮忙吗?提前谢谢.

推荐答案

解决方案:

  1. cd到brew 的公式目录
  • 情报
  • M1
  1. 查找要签出的所需提交(版本63 for icu4c)
git log --follow icu4c.rb
  1. 结帐到新的分行
git checkout -b icu4c-63 e7f0f10dc63b1dc1061d475f1a61d01b70ef2cb7
  1. 使用新版本重新安装库
brew reinstall ./icu4c.rb
  1. 切换到重新安装的版本
brew switch icu4c 63.1
  1. 退房回到主人那里
git checkout master

资料来源:

对于那些不止一次使用此功能的用户,奖励:

# zsh
function hiicu63() {
  local last_dir=$(pwd)

  cd $(brew --prefix)/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
  git checkout icu4c-63
  brew reinstall ./icu4c.rb
  brew switch icu4c 63.1
  git checkout master

  cd $last_dir
}

Postgresql相关问答推荐

Org.postgresql.util.PSQLException:错误:函数LOWER(BYTEA)不存在

为什么Postgres在打印时能完全缩短时间跨度?

在Go中从Kafka读取并写入PostgreSQL时如何处理错误?

使用来自 docker 图像的 postgres 设置 Keycloak 21

Postgres 生成的列不是不可变的

将数组的所有元素循环到jsonb中并修改值

在 Age Viewer 上看不到 node 的第一个属性

从具有加权行概率的 PostgreSQL 表中 Select 随机行

Hibernate 将用户模型保存到 Postgres

如何从 WSL 连接到 windows postgres 数据库

Postgresql SERIAL 的工作方式是否不同?

PostgreSQL:将时间戳转换为时间 - 或仅从时间戳列中检索时间

Postgres 删除表语法错误

POSTGRESQL 中的 CHARINDEX (SQL SERVER) 相似函数是什么?

Postgresql 中的 NOT EXISTS 子句

Postgres 数据库文件保存在 ubuntu 中的什么位置?

如何使用 PostgreSQL 触发器来存储更改(SQL 语句和行更改)

全文的 Postgresql 前缀通配符

使用 Postgresql 在过滤器中制作 Sqlalchemy 使用日期

如何使用 postgresql 按计数排序?