我试图在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.
我的python中datastax-ddc坏了还是坏了?
目前,您可以运行以下步骤:
1)从存储库下载deb软件包
apt-get download cassandra
2)安装deb文件,忽略依赖项
sudo dpkg --force-depends -i cassandra_3.5_all.deb
显然,您应该确保满足所有其他依赖项. python支持已经包含在默认的服务器安装中,所以不用担心,但是python本身可能还没有安装在你的系统上,所以你应该在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