【发布时间】:2022-01-07 21:05:24
【问题描述】:
我尝试使用 Postgresql 12 在 Ubuntu 18.04(32 位)上安装 timescaledb: https://docs.timescale.com/latest/getting-started/installation/ubuntu/installation-apt-ubuntu
当我运行 sudo apt install timescaledb-2-postgresql-12 时出现错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package timescaledb-2-postgresql-12
然后我尝试通过并在本地构建代码(来自存储库https://github.com/timescale/timescaledb),这是成功的(在制作中),但我无法看到构建后要做什么的“下一步”。当我尝试通过添加“shared_preload_libraries = 'timescaledb'”在 postgres.conf 文件中添加扩展名时,然后重新启动。重启时出现错误
2021-02-22 07:24:28.711 EST [18311] syorke@postgres ERROR: could not open extension control file "/usr/share/postgresql/12/extension/timescaledb.control": No such file or directory
在timescaledb.control中是:
# timescaledb extension
comment = 'Enables scalable inserts and complex queries for time-series data'
default_version = '2.0.1'
module_pathname = '$libdir/timescaledb-2.0.1'
#extension cannot be relocatable once installed because it uses multiple schemas and that is forbidden by PG.
#(though this extension is relocatable during installation).
relocatable = false
我的问题是,在找不到包裹的情况下,我是否正确地处理了这个问题? 我应该用我为 timescaledb 构建的目录中的 timescaledb.control.in 替换 /usr/share/postgresql/12/extension/timescaledb.control 吗?
在构建的控制文件中是:
# timescaledb extension
comment = 'Enables scalable inserts and complex queries for time-series data'
default_version = '@PROJECT_VERSION_MOD@'
module_pathname = '$libdir/timescaledb-@PROJECT_VERSION_MOD@'
#extension cannot be relocatable once installed because it uses multiple schemas and that is forbidden by PG.
#(though this extension is relocatable during installation).
relocatable = false
“@PROJECT_VERSION_MOD@”会被替换成什么?$libdir 设置在哪里?
感谢您的帮助。
【问题讨论】:
-
我遇到了同样的问题。这是因为在同一台服务器上安装了多个 PostgreSQL。当我运行包含 PostgreSQL 14 的 TimescaleDB 包时,PostgreSQL 已经安装。通过卸载 12 和 14,然后重新安装 TimescaleDB 包解决了这个问题...
标签: ubuntu-18.04 postgresql-12 timescaledb i386