cqlsh将不会在OS X上运行



我使用自制软件在Big Sur 11.4上安装了Cassandra,当我尝试运行cqlsh时,我收到了这个错误。

isaackim@Isaacs-MacBook-Pro bin % cqlsh
Traceback (most recent call last):
File "/usr/local/Cellar/cassandra/3.11.10/libexec/bin/cqlsh.py", line 2458, in <module>
main(*read_options(sys.argv[1:], os.environ))
File "/usr/local/Cellar/cassandra/3.11.10/libexec/bin/cqlsh.py", line 2232, in read_options
configs.read(CONFIG_FILE)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ConfigParser.py", line 305, in read
self._read(fp, filename)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ConfigParser.py", line 512, in _read
raise MissingSectionHeaderError(fpname, lineno, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.

我之前安装了Anaconda3,但收到了同样的错误(唯一的区别是cqlsh.py的路径(。我认为这可能是Anaconda的问题,所以我完全卸载了Anaconda,然后我用自制软件重新安装了Cassandra。

如果有任何建议,我将不胜感激。提前谢谢。

感谢Alex Ott的建议,我创建了一个只包含以下行的坏~/.cassandra/cqlshrc配置文件,成功地复制了您发布的问题:

username = alice

正如这个错误所表明的:

ConfigParser.MissingSectionHeaderError: File contains no section headers.

配置解析器检测到文件中没有节头。节标题是用方括号([header_name](括起来的行条目。例如:

[authentication]
username = alice
password = Som3Comp7exPa$$word

查看您的cqlshrc并进行必要的更正。如有必要,请使用conf/中的示例cqlshrc.sample文件。干杯

最新更新