本文介绍了使用Homebrew安装icu4c 63版的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图启动 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 ,出现以下错误:

When I used postgres -D /usr/local/var/postgres, got the following error:

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 向我展示了我需要版本63的 icu4c lib。但是

清单icu4c
却说我具有版本64.2。

A quick search on libicui18n.63.dylib showed me I need icu4c lib with version 63. However brew list icu4c says I have the version 64.2.

我都尝试

brew install icu4c 63 & 简单安装icu4c @ 63 ,但是没有运气。

I tried both brew install icu4c 63 & brew install icu4c@63 but no luck.

有人可以帮忙吗?

推荐答案

解决方案:

1) cd 到Homebrew的公式目录

1) cd to Homebrew's formula directory

cd $(brew --prefix)/Homebrew/Library/Taps/homebrew/homebrew-core/Formula

2)查找所需的提交(版本63 icu4c )进行结帐

2) Find desired commit (version 63 for icu4c) to checkout

git log --follow icu4c.rb

3)结帐到新分支

git checkout -b icu4c-63 e7f0f10dc63b1dc1061d475f1a61d01b70ef2cb7

4)重新安装具有新版本的库

4) Reinstall the library with the new version

brew reinstall ./icu4c.rb

5)切换到重新安装的版本

5) Switch to the reinstalled version

brew switch icu4c 63.1

6)结账回主账户

git checkout master

来源:




  • Homebrew install specific version of formula?
  • http://hanxue-it.blogspot.com/2018/08/macos-homebrew-installing-older-version-of-software.html

那些最终使用了一次以上的用户:

Bonus for those who ended up using this more than once:

# 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
}

这篇关于使用Homebrew安装icu4c 63版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 11:19