文件内容没有节头

b1payxdu  于 2021-06-13  发布在  Cassandra
关注(0)|答案(1)|浏览(360)

我想在centos 7上安装cassandra。但当我想将下面的命令行添加到/etc/yum.repos.d/cassandra.repo时,会出现以下错误:

File contains no section headers.
file: file:///etc/yum.repos.d/cassandra.repo, line: 1
'[cassandra] name=Apache Cassandra\n'

cassandra.repo内容:

[cassandra]
name=Apache Cassandra
baseurl=https://www.apache.org/dist/cassandra/redhat/311x/
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://www.apache.org/dist/cassandra/KEYS

如何修复此错误??

pu82cl6c

pu82cl6c1#

您应该像下面这样编写回购文件:

[cassandra] name=Apache Cassandra
baseurl=https://www.apache.org/dist/cassandra/redhat/311x/
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://www.apache.org/dist/cassandra/KEYS

确保已安装Java1.8

相关问题