![为什么我在尝试安装 Redpanda 时出现“无法启动 redpanda.service:未找到单元 redpanda.service。”的信息?](https://linux22.com/image/1023899/%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E5%9C%A8%E5%B0%9D%E8%AF%95%E5%AE%89%E8%A3%85%20Redpanda%20%E6%97%B6%E5%87%BA%E7%8E%B0%E2%80%9C%E6%97%A0%E6%B3%95%E5%90%AF%E5%8A%A8%20redpanda.service%EF%BC%9A%E6%9C%AA%E6%89%BE%E5%88%B0%E5%8D%95%E5%85%83%20redpanda.service%E3%80%82%E2%80%9D%E7%9A%84%E4%BF%A1%E6%81%AF%EF%BC%9F.png)
尝试安装 Redpanda 时出现以下错误
$ curl -1sLf 'https://packages.vectorized.io/nzc4ZYQK3WRGd9sy/redpanda/cfg/setup/bash.deb.sh' | sudo -E bash && sudo apt install redpanda -y && sudo systemctl start redpanda
Executing the setup script for the 'vectorized/redpanda' repository ...
OK: Checking for required executable 'curl' ...
OK: Checking for required executable 'apt-get' ...
OK: Detecting your OS distribution and release using system methods ...
^^^^: ... Detected/provided for your OS/distribution, version and architecture:
>>>>:
>>>>: ... distro=ubuntu version=20.04 codename=focal arch=x86_64
>>>>:
OK: Checking for apt dependency 'apt-transport-https' ...
OK: Checking for apt dependency 'ca-certificates' ...
OK: Checking for apt dependency 'gnupg' ...
RUN: Importing 'vectorized/redpanda' repository GPG key into OK: Importing 'vectorized/redpanda' repository GPG key into apt ...
OK: Checking if upstream install config is OK ...
OK: Installing 'vectorized/redpanda' repository via apt ...
OK: Updating apt repository metadata cache ...
OK: The repository has been installed successfully - You're ready to rock!
Reading package lists... Done
Building dependency tree
Reading state information... Done
redpanda is already the newest version (21.8.1-beta2-1-4dde38a2).
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.
**Failed to start redpanda.service: Unit redpanda.service not found.**
答案1
似乎redpanda.service
没有找到。您可以检查一下您的服务吗?它可能以不同的名称命名。
ls /lib/systemd/system | grep redpanda
然后从找到的名称开始。如果找不到该服务,请尝试重新安装。
- 先把它除去。
sudo apt purge redpanda
- 再次安装,将其直接复制到您的终端。(来源:https://vectorized.io/docs/quick-start-linux)
curl -1sLf 'https://packages.vectorized.io/nzc4ZYQK3WRGd9sy/redpanda/cfg/setup/bash.deb.sh' | sudo -E bash && \
sudo apt install redpanda -y && \
sudo systemctl start redpanda
如果这个方法不能解决你的问题,你应该向 寻求帮助redpanda
。或者等待有redpanda
这方面经验的人。