【问题标题】:Error while installing cassandra安装 cassandra 时出错
【发布时间】:2016-08-21 05:22:06
【问题描述】:

我正在尝试按照此处的说明在 ubuntu 16.04 LTS 上安装 apache cassandra -> http://docs.datastax.com/en/cassandra/3.x/cassandra/install/installDeb.html

但是在运行 sudo apt-get install datastax-ddc 命令时出现以下错误:

Reading package lists... Done Building dependency tree  
Reading state information... Done Some packages could not be
installed. This may mean that you have requested an impossible
situation or if you are using the unstable distribution that
some required packages have not yet been created or been moved
out of Incoming. The following information may help to resolve
the situation:

The following packages have unmet dependencies:
  datastax-ddc :  Depends: python-support (>= 0.90.0) but it is not
                           installable  
                  Recommends: ntp but it is not going to be installed or  
                              time-daemon
                  Recommends: datastax-ddc-tools but it is not going to
                              be installed  E: Unable to correct problems,
                              you have held broken packages.

datastax-ddc 是坏了还是我的 python 出了什么问题?

【问题讨论】:

标签: ubuntu cassandra


【解决方案1】:

目前,您可以运行以下步骤:

1) 从仓库下载deb包

apt-get download cassandra

2) 安装deb文件,忽略依赖

sudo dpkg --force-depends -i cassandra_3.5_all.deb

显然,您应该确保满足所有其他依赖项。 python-support 已经包含在默认服务器安装中,所以不用担心,但是,python 本身可能尚未安装在您的系统上,因此您应该运行以下 BEFORE dpkg -i ...:

sudo apt-get install python

要在尝试安装之前查看 .deb 的 Depends: ...,您可以使用 -I 选项,如下所示:

dpkg -I cassandra_3.5_all.deb

对于 Cassandra 3.5,我看到以下内容:

Depends: openjdk-8-jre-headless | java8-runtime, adduser, python (>= 2.7), python-support (>= 0.90.0)

因此,您可以先运行以下命令以确保确实满足所有依赖项:

sudo apt-get install adduser python oracle-java8-installer

或者如果您想使用 OpenJDK(未测试):

sudo apt-get install adduser python default-jre

【讨论】:

    【解决方案2】:

    答案的简短版本: ubuntu 安装了 python 2 和 python 3,但没有安装现在由 ajenti 维护的 python-support。所以要正确安装 cassandra(如 datastax 文档中描述的正常程序)

    https://askubuntu.com/questions/766169/why-no-more-python-support-in-16-04

    curl https://raw.githubusercontent.com/ajenti/ajenti/master/scripts/install.sh > install.sh && sudo bash install.sh wget http://launchpadlibrarian.net/109052632/python-support_1.0.15_all.deb sudo dpkg -i python-support_1.0.15_all.deb

    【讨论】:

      猜你喜欢
      • 2014-12-08
      • 1970-01-01
      • 1970-01-01
      • 2019-10-11
      • 2016-10-02
      • 1970-01-01
      • 2017-10-12
      • 2014-09-20
      相关资源
      最近更新 更多