DataStax C/C++ Driver for Apache Cassandra is currently not available from the Ubuntu official repository.
There are .deb
packages for Ubuntu which are available as mentioned in the DataStax project documentation on github datastax/cpp-driver
repository from this location:
http://downloads.datastax.com/cpp-driver/
If you are using Ubuntu 16.04, the last .deb
available are under ubuntu/16.04/cassandra/v2.7.0/
.
You will find the cassandra.h
file in cassandra-cpp-driver-dev_2.7.0-1_amd64.deb
, which you need to download and install with dpkg
.
The suffix dev
in a Debian or Ubuntu package denotes a package meant for developing programs, containing, in particular, header files.
dpkg -i cassandra-cpp-driver-dev_2.7.0-1_amd64.deb
The header will get installed in the usual location under Linux for header files that your compiler should find without a problem: /usr/include/cassandra.h
.
it will also install:
/usr/lib/x86_64-linux-gnu/libcassandra_static.a
/usr/lib/x86_64-linux-gnu/pkgconfig/cassandra.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/cassandra_static.pc
/usr/share/doc/cassandra-cpp-driver-dev/changelog.Debian.gz
/usr/share/doc/cassandra-cpp-driver-dev/copyright
which you will need for static linking and for pkgconfig to work properly.
What you may have installed is cassandra-cpp-driver_2.7.0-1_amd64.deb
which contains the libcassandra.so.2.7.0
that is the shared object (dynamic) library binary file,.. although whatever you installed should indeed come in the result of a dkpg -l
query such as:
dpkg -l | grep cassandra
If you installed anything from an unofficial source, I would suggest you uninstall these first, and install the provided .deb
for your plaform from the official source.
Follow the documentation's instructions for making your first program with this library.