ubuntu-18.04 - 安装 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 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
由于您已从源代码安装,因此您可能需要先卸载
推荐阅读
- security - SSL:使用 Python 请求库的证书验证失败
- python - Python Snake 游戏最终确定问题
- c# - 使用 AutoFixture/AutoMoq 为深度嵌套的类创建 Mock?
- ios - 如何向 MKAnnotationView 添加回调?
- javascript - 为什么需要传入 this.state.example 来重新渲染页面?
- python - 值小于行的计数总和
- sql - 查找两个表之间重叠的最有效方法
- node.js - 配置 OracleDb 和 Nodejs 连接时出错
- excel - 我们可以单击特定单元格并执行以显示/隐藏不同单元格中的图像吗?
- javascript - 我们可以禁用 JSX 自闭标签吗?