Postgresql 使用自制软件安装icu4c版本63
我试图启动Postgresql 使用自制软件安装icu4c版本63,postgresql,homebrew,icu4c,Postgresql,Homebrew,Icu4c,我试图启动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
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
lib版本63。但是brew列表icu4c
说我有64.2版
我尝试了brew安装icu4c 63和brew安装icu4c@63但运气不好
有人能帮忙吗?提前感谢。解决方案:
1) cd
到自制的公式目录
cd $(brew --prefix)/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
2) 查找要签出的所需提交(icu4c的63版)
git log --follow icu4c.rb
3) 结帐到新分行
git checkout -b icu4c-63 e7f0f10dc63b1dc1061d475f1a61d01b70ef2cb7
4) 使用新版本重新安装库
brew reinstall ./icu4c.rb
5) 切换到重新安装的版本
brew switch icu4c 63.1
6) 签回主控台
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
}
这应该更容易
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/e7f0f10dc63b1dc1061d475f1a61d01b70ef2cb7/Formula/icu4c.rb
如@dingusjh所说,但是如果brew抱怨icu4c已经安装,您应该尝试
提取
,请使用重新安装
命令而不是安装
。然后,完整的命令将是:
brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/e7f0f10dc63b1dc1061d475f1a61d01b70ef2cb7/Formula/icu4c.rb
对我来说,重新安装icu4c很有效。
brew重新安装icu4c
顺便说一句,如果有人知道更好/更简单的方法和共享,我会非常感激:)在brew中安装旧版本的方法非常棒,比我见过的其他方法简单得多,非常感谢!这成功了!但听起来好像它有可能给我的机器加砖头!我的情况是:安装了phpbrew php7.3,然后npm和节点不工作,这是非常安全的。在最坏的情况下,senario必须重新安装php/node.:)如果出于任何原因,您在git日志中看不到所需的版本,您可以尝试下载完整的历史记录,git-C“$(brew--repo homebrew/core)“fetch--unslow
我过去曾将此方法用于其他公式,但在本例中不起作用。向我建议改用brew extract
,并警告“icu4c 63.1已安装且最新\n要重新安装63.1,请运行brew重新安装icu4c
”…运行重新安装命令重新安装最新版本(截至本文撰写时为64.2)。不知道这是否是新的brew行为或错误或什么。返回到从本地brew水龙头获取,如ogirginc的回答所示