首页 > 解决方案 > 安装 timescaledb 失败

问题描述

我尝试使用 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 设置在哪里?

谢谢你的帮助。

标签: ubuntu-18.04postgresql-12timescaledbi386

解决方案


嗨,我刚刚使用脚本在 Ubuntu 20.04 上成功安装

https://packagecloud.io/timescale/timescaledb/install

而不是在正常安装过程中执行第 3 步 https://docs.timescale.com/install/latest/self-hosted/installation-debian/#installing-self-hosted-timescaledb-on-debian-based-systems

然后按照文档中的步骤 4 和 5

由于您已从源代码安装,因此您可能需要先卸载


推荐阅读