Brew resolves Postgres dependency to v13 which isn't supported yet
baarkerlounger opened this issue · comments
Brew now tries to install Postgres 13 as a dependency but that doesn't seem to be supported yet.
$ brew install timescaledb --with-oss-only
==> Installing dependencies for timescale/tap/timescaledb: postgresql
==> Installing timescale/tap/timescaledb dependency: postgresql
==> Pouring postgresql-13.0.catalina.bottle.tar.gz
-- Compiling against PostgreSQL version 13.0
CMake Error at CMakeLists.txt:209 (message):
TimescaleDB only supports PostgreSQL 9.6.3+, 10.2+, 11 or 12
Ran into the same issue. This seems pretty similar to #6
I was able to get things back in place by editing the recipe locally.
- Run
brew edit timescaledb
- Change the dependency to postgresql to
postgresql@11
- Make sure you remove postgresql 13:
brew uninstall postgresql --ignore-dependencies
- Then
brew upgrade timescale/tap/timescaledb
I did not lose any data along the way.
(I also tried postgresql@12 too, which I think should work but I was getting compilation errors postgres.h
not found - I did not investigate too much since @11 works and is all I need).
I ended up doing:
brew install postgresql
brew install postgresql@12
cp -rf /usr/local/Cellar/postgresql@12/12.4_1 /usr/local/Cellar/postgresql/
brew switch postgres 12.4_1
cp -rf /usr/local/Cellar/postgresql/12.4_1/include/postgresql/include/ /usr/local/opt/postgresql@12/include/
Which got it working with postgresl@12. That last step is the one that resolved compilation errors for me (moves the server headers to where pg_config was looking for them).
Waiting for the compatibility of PG13 by Timescale, we use PG11 in my team.
So, I wrote the following tutorial.
Thank you @sarfata for your answer.
Install TimescaleDb on Mac
Because of the incompatibility of postgresql 13 with timescaledb, you need to install postgresql 11.
With these following steps, you will install postgres 11 and timescaledb.
-
Install the version 11 of postgresql
brew install postgresql@11
-
Link postgresql 11
brew link --overwrite -f postgresql@11
-
Change text editor of homebrew to put your favorite editor (VSCode in the example)
In our case, put the following line on your .zshrc file :
export HOMEBREW_EDITOR=code
-
Add the tap of timescaledb
brew tap timescale/tap
-
Open edition of install config of timescaledb
brew edit timescaledb
-
Replace
postgresql
bypostgresql@11
in the config file. -
Install timescaledb
brew install timescaledb
-
Move files to appropriate place
/usr/local/bin/timescaledb_move.sh
Following @baarkerlounger instructions I had to modify the last cp
command to be
cp -rf /usr/local/Cellar/postgresql/12.4_1/include/postgresql/server /usr/local/opt/postgresql@12/include/
on my Mac.
What worked for me is:
brew edit timescaledb
and change the dependency to postgresql to postgresql@12cp -rf /usr/local/Cellar/postgresql\@12/12.4_1/include/postgresql/server /usr/local/opt/postgresql@12/include/
brew install timescaledb
For MacOS Catalina, complete steps after trying brew install timescaledb
and failed
brew uninstall postgresql
brew install postgresql@12
ln -s /usr/local/Cellar/postgresql@12/12.4_1/include/postgresql/server /usr/local/Cellar/postgresql@12/12.4_1/include/server
brew tap timescale/tap
brew edit timescale/tap/timescaledb
-- depends_on "postgresql" => :build #old
-- depends_on "postgresql@12" => :build #new
brew install timescaledb
@RobAtticus I think we can close this now. As the fix is merged.
I installed the 2.3.0 formula with PostgreSQL 13 and it works, maybe we could close this issue now?