sqitchers / homebrew-sqitch

Homebrew Formulas for Sqitch
22 stars 10 forks source link

brew install with postgres issue #56

Closed Alam080 closed 1 year ago

Alam080 commented 1 year ago

Hi, I have tried to follow the instructions to install sqitch on my Macbook but am failing on the formula section.

brew install sqitch --with-postgres-support --verbose
==> Downloading https://formulae.brew.sh/api/formula.jws.json
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 3764k  100 3764k    0     0  10.4M      0 --:--:-- --:--:-- --:--:-- 10.5M
==> Downloading https://formulae.brew.sh/api/cask.jws.json
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  919k  100  919k    0     0  6887k      0 --:--:-- --:--:-- --:--:-- 7017k
Warning: No available formula with the name "postgresql" (dependency of sqitchers/sqitch/sqitch). Did you mean postgresql@13, postgresql@12, postgresql@11, postgresql@15, postgresql@10, postgresql@14, postgresql@9.5, postgresql@9.4, postgrest or qt-postgresql?
postgresql breaks existing databases on upgrade without human intervention.

See a more specific version to install with:
  brew formulae | grep postgresql@

After checking the formula in the repo, it is calling postgresql when brew only allow specific version install of postgresql. i have installed postgresql@15 but still getting this error.

How should I solve this issue?

theory commented 1 year ago

Honestly I have no idea. PostgreSQL is clearly there:

$ brew formulae | grep postgresql@
postgresql@10
postgresql@11
postgresql@12
postgresql@13
postgresql@14
postgresql@15
postgresql@9.4
postgresql@9.5

The bit about installing a specific version is a warning (for now). I'll have to see what to do about that.

perryao commented 1 year ago

I think they've decided to make postgresql a strictly versioned formula in https://github.com/Homebrew/homebrew-core/pull/107726

I'm seeing a couple of other formulas define postgresql like so:

def postgresql
    Formula["postgresql@14"]
end

see https://github.com/search?q=repo%3AHomebrew%2Fhomebrew-core%20postgresql&type=code

Alam080 commented 1 year ago

So the formula for homebrew-sqitch need to be updated to use a specific version of postgresql?

I guess the latest version would be best but allowing other version would also be okay.

Maybe something like below, where the version can be specified. brew install sqitch --with-postgres-15-support

just a suggestion or maybe there is a better way around this?

theory commented 1 year ago

Yeah, that's one of the ideas under discussion in Homebrew/#4391.

theory commented 1 year ago

Meanwhile, you can install Postgres separately.

Alam080 commented 1 year ago

ok, got Sqitch and Postgres installed separately and it seems to be working.

Thanks for the help.

Should I close this issue now that Sqitch is working for me?

theory commented 1 year ago

I'm gonna leave it open because we'll have to tweak something to properly support Postgres formulas.