无法安装新的 clickhouse-server安装失败,出现 Poco::Exception代码:1000

问题描述

我正在 Ubuntu 20.04.1 LTS 上本地安装 clickhouse-server 和 clickhouse-client。 我以前的安装工作正常,但在某些时候它坏了。 从这里运行官方推荐的脚本后: https://clickhouse.tech/docs/en/getting-started/install/

sudo apt-get install apt-transport-https ca-certificates dirmngr
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E0C56BD4

echo "deb https://repo.clickhouse.tech/deb/stable/ main/" | sudo tee \
    /etc/apt/sources.list.d/clickhouse.list
sudo apt-get update

sudo apt-get install -y clickhouse-server clickhouse-client

sudo service clickhouse-server start
clickhouse-client

我收到错误

Users config file /etc/clickhouse-server/users.xml already exists,will keep it and extract users info from it.
Poco::Exception. Code: 1000,e.code() = 0,e.displayText() = Exception: Failed to merge config with '/etc/clickhouse-server/users.d/default-password.xml': SAXParseException: Invalid token in '/etc/clickhouse-server/users.d/default-password.xml',line 1 column 13 (version 21.1.2.15 (official build))
dpkg: error processing package clickhouse-server (--configure):
 installed clickhouse-server package post-installation script subprocess returned error exit status 232
Setting up clickhouse-client (21.1.2.15) ...
Processing triggers for systemd (245.4-4ubuntu3.4) ...
Errors were encountered while processing:
 clickhouse-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

有输入密码的提示,但我忽略了它,直接按回车键。解决此问题的最佳方法是什么? 谢谢。

解决方法

你能显示 cat /etc/clickhouse-server/users.d/default-password.xml 吗? 如果您按 enter,它应该有空密码。

你可以删除rm /etc/clickhouse-server/users.d/default-password.xml