微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

macos – brew安装postgresql(升级)错误,无法链接 – 死链接到旧的不存在的版本

Warning: Do not start deleting files manually in Terminal unless
you’ve tried everything else first. Manual deletion may caused
uninstall and install programs to crash.

这是QA风格的帖子,分享解决问题的途径.我相信有更好的方法

我选择了一个较旧的mac air并希望将其设置为Ruby和Rails培训.在升级过程中,我遇到了安装postgresql的问题:

➜  ~  brew install postgresql
....
==> Installing postgresql
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/postgresql-9.3.5.mountain_lion.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/postgresql-9.3.5.mountain_lion.bottle.tar.gz
==> Pouring postgresql-9.3.5.mountain_lion.bottle.tar.gz
==> Caveats
...
To reload postgresql after an upgrade:
    launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
Error: An unexpected error occurred during the `brew link` step
The formula built,but is not symlinked into /usr/local
No such file or directory - /usr/local/Cellar/postgresql/9.2.3/include/server
Error: No such file or directory - /usr/local/Cellar/postgresql/9.2.3/include/server

我正在安装postgresql 9.3.5,我不在乎9.2.3没有找到!

➜  ~  brew install postgresql
Warning: postgresql-9.3.5 already installed,it's just not linked

但是postgres仍然被打破了.

有什么问题?

我有类似的问题,但有另一个包.原来,有一堆死链接指向旧版本所有其他我的文件系统.以下是我案例中的帮助:

>运行brew链接< appname> (例如brew link postgress);
>如果成功完成,那么你是黄金,否则继续下一步;
>通过删除Cellar /< app name> /< version>来查看错误消息中的路径(例如/usr/local/Cellar/postgresql/9.2.3/include/server)转换路径.从它(例如/usr/local/include / server)
>在该路径下查找所有指向Cellar /< app name> /< version>的链接删除它们;
>转到第1步.

希望有所帮助

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐