Homebrew安装报错Error: postgresql: Invalid bottle tag symbol

1.问题概述

MacOS上使用Homebrew安装postgres时报错

安装命令:brew install postgres

报错信息:Error: postgresql: Invalid bottle tag symbol。

2.解决方案

使用命令:brew edit postgres,打开postgres的formula:

class Postgresql < Formula
  desc "Object-relational database system"
  homepage "https://www.postgresql.org/"
  url "https://ftp.postgresql.org/pub/source/v12.2/postgresql-12.2.tar.bz2"
  sha256 "ad1dcc4c4fc500786b745635a9e1eba950195ce20b8913f50345bb7d5369b5de"
  revision 1
  head "https://github.com/postgres/postgres.git"

  <其他配置...>  

  bottle do
    sha256 arm64_monterey: "fe137ea6536535299a666ea9e126e84fd58712d25c7071073bb4053da70ad2f0"
    sha256 arm64_big_sur:  "b0a1686c5c5ba668e78a97d66567e9d007f7d2a0c9b1a53e79841e3736d729e6"
    sha256 monterey:       "d40731741ca7d7b16b791fa31d21baab674720c87c00adbf54ca796ff80b9b0f"
  end

  <其他配置...>

bottle doend及其之间的内容删除,结果如下:

class Postgresql < Formula
  desc "Object-relational database system"
  homepage "https://www.postgresql.org/"
  url "https://ftp.postgresql.org/pub/source/v12.2/postgresql-12.2.tar.bz2"
  sha256 "ad1dcc4c4fc500786b745635a9e1eba950195ce20b8913f50345bb7d5369b5de"
  revision 1
  head "https://github.com/postgres/postgres.git"

  <其他配置...>  

  <其他配置...>

退出时,记得wq。

重新执行安装命令:brew install postgres 即可。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值