在 Ubuntu 18.04 WSL 2 上安装 Couchbase

在 Ubuntu 18.04 WSL 2 上安装 Couchbase

couchbase-server-community我正在尝试使用 Couchbase 官方网站上的基本说明在我的 Ubuntu 18.04 WSL 2 上安装。

跑步时sudo apt install couchbase-server-community,我收到了

Unpacking couchbase-server-community (6.6.0-7909-1) ...
Setting up couchbase-server-community (6.6.0-7909-1) ...
System has not been booted with systemd as init system (PID 1). Can't operate.
dpkg: error processing package couchbase-server-community (--configure):
 installed couchbase-server-community package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 couchbase-server-community
E: Sub-process /usr/bin/dpkg returned an error code (1)

如何成功安装并运行适用于我的 Ubuntu 版本的最新 Couchbase?

答案1

正如 @berndbausch 在评论中提到的,WSLsystemd目前不支持,并且 couchbase 包肯定正在尝试使用systemd.

除了 @berndbausch 建议尝试禁用安装后脚本之外,还有其他两种可能性。请注意,我自己没有做过其中任何一个,但至少第一个应该是完全可行的。

首先,也可能是最简单的,是在 WSL2 Ubuntu 发行版上安装 Docker 并使用Couchbase 泊坞窗镜像

其次,Couchbase还提供了“非基于包”安装方法。对于未来潜在的读者来说,@Avi 在提出原始问题的评论中已确认这在 WSL 中有效。但是,设置 ulimit(如非基于包的安装中所述)当前似乎需要 WSL 中的解决方法。在设置 ulimit 之前,请运行su $USER.请注意,提高 ulimit 仅在该子 shell 中有效。看这个 Github 评论和话题了解更多信息。

相关内容