gpt4 book ai didi

linux - E : Package 'cassandra' has no installation candidate when installing Cassandra

转载 作者:行者123 更新时间:2023-12-04 18:38:57 36 4
gpt4 key购买 nike

我试图在我的 Ubuntu 系统上卸载并重新安装 Cassandra,但是为了清理我删除了包含 cassandra 的文件名,并意外删除了必要的文件,包括/etc/apt/sources.list.d/cassandra.sources.list文件。现在,当我尝试使用命令 sudo apt-get install cassandra 安装 Cassandra 时,它给出了错误 E: Package 'cassandra' has no installation candidate .我怎样才能解决这个问题?
我跑了sudo apt-get update cassandra.sources.list 文件似乎又回来了,内容为 deb [arch=amd64] https://downloads.apache.org/cassandra/debian 311x main但在尝试安装 cassandra 时仍然会出现同样的错误

最佳答案

我能够关注 documentation要安装 cassandra,我唯一调整的是 curl -L flag但除此之外,这可以解决您的问题。

$ echo "deb http://www.apache.org/dist/cassandra/debian 40x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
deb http://www.apache.org/dist/cassandra/debian 40x main

# Make sure the `cassandra.sources.list` file has only this single line.

$ sudo cat /etc/apt/sources.list.d/cassandra.sources.list
deb http://www.apache.org/dist/cassandra/debian 40x main

$ curl -L https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add -
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 227 100 227 0 0 4283 0 --:--:-- --:--:-- --:--:-- 4283
100 267k 100 267k 0 0 296k 0 --:--:-- --:--:-- --:--:-- 296k
OK

$ sudo apt-get update
$ sudo apt-get install cassandra

关于linux - E : Package 'cassandra' has no installation candidate when installing Cassandra,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69427161/

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com