这个问题不在 Stack Overflow 所以我决定问它并回答它
第 1 步:确保您安装了最新的 postgress.app
您至少需要拥有 postgres.app 的 postgres v14,否则您将收到此错误
ld: can't link with a main executable file '/Applications/Postgres.app/Contents/Versions/13/bin/postgres' for architecture arm64
因为旧版本只使用英特尔
第 2 步:按照自制软件的说明进行操作
使用说明here
但是当你到达这一步时timescaledb-tune --quiet --yes你开始按照我的指示
第三步:我的指示
步骤 3.1
由于 homebrew 方法需要使用 homebrew postgres 你必须将 tune 命令指向 postgress.app 配置文件,而不是运行这个
timescaledb-tune --yes --conf-path=/Users/tawanda/Library/Application Support/Postgres/var-14/postgresql.conf
如果以后用你的 postgres 版本替换 var-14
步骤 3.2
如下手动运行您自己的设置,因为 timescale 附带的脚本不适用于您的 posgresss.app 用例
/usr/bin/install -c -m 755 $(find /opt/homebrew/Cellar/timescaledb/2.7.2/lib/timescaledb/postgresql/ -name "timescaledb*.so") /Applications/Postgres.app/Contents/Versions/14/lib/postgresql
/usr/bin/install -c -m 644 /opt/homebrew/Cellar/timescaledb/2.7.2/share/timescaledb/* /Applications/Postgres.app/Contents/Versions/14/share/postgresql/extension/
如果稍后,请分别用您的 postgres 和 timescale 版本替换版本 14 和版本 2.7.2
step3.3
初始化扩展
tawanda=# CREATE database tsdb;
tawanda=# \c tsdb;
tsdb=# CREATE EXTENSION IF NOT EXISTS timescaledb;
WARNING:
WELCOME TO
_____ _ _ ____________
|_ _(_) | | | _ \ ___ \
| | _ _ __ ___ ___ ___ ___ __ _| | ___| | | | |_/ /
| | | | _ ` _ \ / _ \/ __|/ __/ _` | |/ _ \ | | | ___ \
| | | | | | | | | __/\__ \ (_| (_| | | __/ |/ /| |_/ /
|_| |_|_| |_| |_|\___||___/\___\__,_|_|\___|___/ \____/
Running version 2.7.2
For more information on TimescaleDB, please visit the following links:
1. Getting started: https://docs.timescale.com/timescaledb/latest/getting-started
2. API reference documentation: https://docs.timescale.com/api/latest
3. How TimescaleDB is designed: https://docs.timescale.com/timescaledb/latest/overview/core-concepts
Note: TimescaleDB collects anonymous reports to better understand and assist our users.
For more information and how to disable, please see our docs https://docs.timescale.com/timescaledb/latest/how-to-guides/configuration/telemetry.
CREATE EXTENSION