---
title: "Install the Aerospike client"
description: "Installation guide for the Aerospike C client on Amazon Linux, Debian, RHEL, Ubuntu, macOS, and Windows."
---

# Install the Aerospike client

> For the complete documentation index see: [llms.txt](https://aerospike.com/docs/llms.txt)
> 
> All documentation pages available in markdown.

-   [Amazon](#tab-panel-2582)
-   [Debian](#tab-panel-2583)
-   [Red Hat](#tab-panel-2584)
-   [Ubuntu](#tab-panel-2585)
-   [macOS](#tab-panel-2586)
-   [Windows](#tab-panel-2587)

## Prerequisites

The Aerospike C client library requires the following libraries present on the machine to build and run:

| Library Name | .rpm Package | Description |
| --- | --- | --- |
| libssl | openssl |  |
| libcrypto | openssl | Required for RIPEMD160 hash function. |

To install library prerequisites using `yum`:

Terminal window

```bash
sudo yum install openssl-devel
```

Some installation paths do not include the necessary C development tools. You may also need these packages:

Terminal window

```bash
sudo yum install gcc gcc-c++
```

If asynchronous functionality is desired, one of the following event frameworks must be installed.

### [libuv 1.15.0+](https://docs.libuv.org)

libuv has excellent performance and supports all platforms. The client also supports async TLS (SSL) sockets when using libuv.

### [libev 4.24+](http://dist.schmorp.de/libev)

libev has excellent performance on Linux/macOS, but its Windows implementation is suboptimal. Therefore, the C client supports libev on Linux/macOS only. The client does support async TLS (SSL) sockets when using libev.

### [libevent 2.1.8+](http://libevent.org)

libevent is less performant than the other two options, but it does support all platforms. The client also supports async TLS (SSL) sockets when using libevent.

If a different event framework version is required, then the C client should be built from [source code](https://github.com/aerospike/aerospike-client-c) with that event framework version instead of following these pre-compiled library installation steps.

## Download and Extract

You can download the C client package manually from the [Download](https://aerospike.com/download/client/c/) page. Make sure to read the [release notes](https://github.com/aerospike/aerospike-client-c/releases) of the version you are downloading. Alternatively, you can automate downloading versions of the C client package from the [artifact repository](https://download.aerospike.com/artifacts/aerospike-client-c/):

```plaintext
https://download.aerospike.com/artifacts/aerospike-client-c/<version>/
```

-   [Amazon Linux 2023](#tab-panel-2572)

| Package | Description |
| --- | --- |
| aerospike-client-c\_<VERSION>\_amzn2\_<ARCH>.tgz | sync commands |
| aerospike-client-c-libuv\_<VERSION>\_amzn2\_<ARCH>.tgz | sync and async commands with libuv |
| aerospike-client-c-libev\_<VERSION>\_amzn2\_<ARCH>.tgz | sync and async commands with libev |
| aerospike-client-c-libevent\_<VERSION>\_amzn2\_<ARCH>.tgz | sync and async commands with libevent |

Extract the contents of the chosen package:

Terminal window

```bash
tar xvf <package>
```

### Example

Terminal window

```bash
tar xvf aerospike-client-c-libuv_6.4.1_amzn2_x86_64.tgz

cd aerospike-client-c-libuv_6.4.1_amzn2_x86_64
```

## Contents

The package contains the following installer packages:

-   [Amazon Linux 2023](#tab-panel-2563)

-   `aerospike-client-c[-{EVENTLIB}]-devel-&lt;VERSION&gt;-1.amzn2.&lt;ARCH&gt;.rpm`
    
    Aerospike C client development (static library and header files) installer for given version and event framework library. This installer is used for developers when compiling/linking their applications with the Aerospike client library.
    
-   `aerospike-client-c[-{EVENTLIB}]-&lt;VERSION&gt;-1.amzn2.&lt;ARCH&gt;.rpm`
    
    Aerospike C client runtime (shared library) installer for given version and event framework library.
    

## Install

Install one development package to compile your application with Aerospike client. Install corresponding runtime package to run your application with Aerospike client.

Terminal window

```bash
sudo rpm -i <installer package>
```

### Example

-   [Amazon Linux 2023](#tab-panel-2564)

Terminal window

```bash
sudo rpm -i aerospike-client-c-libuv-devel-6.4.1-1.amzn2.x86_64.rpm

sudo rpm -i aerospike-client-c-libuv-6.4.1-1.amzn2.x86_64.rpm
```

Development files install in:

-   `/usr/include/aerospike`
-   `/usr/include/citrusleaf`
-   `/usr/lib/libaerospike.a`

Runtime files install in:

-   `/usr/lib/libaerospike.so`

## Building Applications with Event Library

Event libraries usually install into /usr/local/lib. Most operating systems do not search /usr/local/lib by default. Therefore, the following `LD_LIBRARY_PATH` setting may be necessary.

Terminal window

```bash
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
```

When compiling your async applications with aerospike header files, the event library must be defined (`-DAS_USE_LIBUV` or `-DAS_USE_LIBEV` or `-DAS_USE_LIBEVENT`) on the command line or in an IDE. Example:

Terminal window

```bash
gcc -DAS_USE_LIBUV -o myapp myapp.c -laerospike -lev -lssl -lcrypto -lpthread -lm -lz
```

## Prerequisites

Install library prerequisites using `apt-get`:

Terminal window

```bash
sudo apt-get update

sudo apt-get install libssl-dev zlib1g-dev make
```

For asynchronous functionality, install one of the following event frameworks.

### [libuv 1.15.0+](https://docs.libuv.org)

libuv has excellent performance and supports all platforms. The client also supports async TLS (SSL) sockets when using libuv.

### [libev 4.24+](http://dist.schmorp.de/libev)

libev has excellent performance on Linux/macOS, but its Windows implementation is suboptimal. Therefore, the C client supports libev on Linux and macOS only. The client does support async TLS (SSL) sockets when using libev.

### [libevent 2.1.8+](http://libevent.org)

libevent is less performant than the other two options, but it does support all platforms. The client also supports async TLS (SSL) sockets when using libevent.

If a different event framework version is required, then the C client should be built from [source code](https://github.com/aerospike/aerospike-client-c) with that event framework version instead of following these pre-compiled library installation steps.

## Download and Extract

You can download the C client package manually from the [Download](https://aerospike.com/download/client/c/) page. Make sure to read the [release notes](https://github.com/aerospike/aerospike-client-c/releases) of the version you are downloading. Alternatively, you can automate downloading versions of the C client package from the [artifact repository](https://download.aerospike.com/artifacts/aerospike-client-c/):

```plaintext
https://download.aerospike.com/artifacts/aerospike-client-c/<version>/
```

### C client version 6.3.0 and newer

Support for 64-bit ARM (ARMv8.2-A instruction set) was added in C client version 6.3.0, in parallel with the server 6.2.0 ARM support.

::: caution
The C client package naming was changed to align with the server and tools packages.
:::

-   [Debian 12](#tab-panel-2575)
-   [Debian 13](#tab-panel-2576)

`ARCH` platforms are based on `uname -m`, and include `x86_64`, `aarch64` (Graviton 2 and similar) and `arm64` (Apple M1).

| Package | Description |
| --- | --- |
| aerospike-client-c\_<VERSION>\_debian12\_<ARCH>.tgz | sync commands |
| aerospike-client-c-libuv\_<VERSION>\_debian12\_<ARCH>.tgz | sync and async commands with libuv |
| aerospike-client-c-libev\_<VERSION>\_debian12\_<ARCH>.tgz | sync and async commands with libev |
| aerospike-client-c-libevent\_<VERSION>\_debian12\_<ARCH>.tgz | sync and async commands with libevent |

Extract the contents of the chosen package:

Terminal window

```bash
tar xvf <package>
```

### Example

Terminal window

```bash
tar xvf aerospike-client-c-libuv_7.4.1_debian12_x86_64.tgz

cd aerospike-client-c-libuv_7.4.1_debian12_x86_64
```

`ARCH` platforms are based on `uname -m`, and include `x86_64`, `aarch64` (Graviton 2 and similar) and `arm64` (Apple M1).

| Package | Description |
| --- | --- |
| aerospike-client-c\_<VERSION>\_debian13\_<ARCH>.tgz | sync commands |
| aerospike-client-c-libuv\_<VERSION>\_debian13\_<ARCH>.tgz | sync and async commands with libuv |
| aerospike-client-c-libev\_<VERSION>\_debian13\_<ARCH>.tgz | sync and async commands with libev |
| aerospike-client-c-libevent\_<VERSION>\_debian13\_<ARCH>.tgz | sync and async commands with libevent |

Extract the contents of the chosen package:

Terminal window

```bash
tar xvf <package>
```

### Example

Terminal window

```bash
tar xvf aerospike-client-c-libuv_7.4.1_debian13_x86_64.tgz

cd aerospike-client-c-libuv_7.4.1_debian13_x86_64
```

## Contents

The package contains two installers for the given architecture. The supported `DEB-ARCH` architectures are `amd64` (equivalent to x86\_64) and `arm64` (equivalent to aarch64).

-   `aerospike-client-c[-{EVENTLIB}]-devel_&lt;VERSION&gt;-debian12_{DEB-ARCH}.deb`
    
    Aerospike C client development (static library and header files) installer for given version and event framework library. This installer is used for developers when compiling/linking their applications with the Aerospike client library.
    
-   `aerospike-client-c[-{EVENTLIB}]_&lt;VERSION&gt;-debian12_{DEB-ARCH}.deb`
    
    Aerospike C client runtime (shared library) installer for given version and event framework library.
    

## Install

Install one development package to compile your application with Aerospike client. Install corresponding runtime package to run your application with Aerospike client.

Terminal window

```bash
sudo dpkg -i <installer package>
```

### Example

Terminal window

```bash
sudo dpkg -i aerospike-client-c-libuv-devel_6.4.4-debian12_amd64.deb

sudo dpkg -i aerospike-client-c-libuv_6.4.4-debian12_amd64.deb
```

Development files install in:

-   `/usr/include/aerospike`
-   `/usr/include/citrusleaf`
-   `/usr/lib/libaerospike.a`

Runtime files install in:

-   `/usr/lib/libaerospike.so`

## Building Applications with Event Library

Event libraries usually install into /usr/local/lib. Most operating systems do not search /usr/local/lib by default. Therefore, the following `LD_LIBRARY_PATH` setting may be necessary.

Terminal window

```bash
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
```

When compiling your async applications with aerospike header files, the event library must be defined (`-DAS_USE_LIBUV` or `-DAS_USE_LIBEV` or `-DAS_USE_LIBEVENT`) on the command line or in an IDE. Example:

Terminal window

```bash
gcc -DAS_USE_LIBUV -o myapp myapp.c -laerospike -lev -lssl -lcrypto -lpthread -lm -lz
```

## Prerequisites

The Aerospike C client library requires the following libraries present on the machine to build and run:

| Library Name | .rpm Package | Description |
| --- | --- | --- |
| libssl | openssl |  |
| libcrypto | openssl | Required for RIPEMD160 hash function. |

To install library prerequisites using `yum`:

Terminal window

```bash
sudo yum install openssl-devel
```

Some CentOS installation paths do not include the necessary C development tools. You may also need these packages:

Terminal window

```bash
sudo yum install gcc gcc-c++
```

If asynchronous functionality is desired, one of the following event frameworks must be installed.

### [libuv 1.15.0+](https://docs.libuv.org)

libuv has excellent performance and supports all platforms. The client also supports async TLS (SSL) sockets when using libuv.

### [libev 4.24+](http://dist.schmorp.de/libev)

libev has excellent performance on Linux/macOS, but its Windows implementation is suboptimal. Therefore, the C client supports libev on Linux/macOS only. The client does support async TLS (SSL) sockets when using libev.

### [libevent 2.1.8+](http://libevent.org)

libevent is less performant than the other two options, but it does support all platforms. The client also supports async TLS (SSL) sockets when using libevent.

If a different event framework version is required, then the C client should be built from [source code](https://github.com/aerospike/aerospike-client-c) with that event framework version instead of following these pre-compiled library installation steps.

## Download and Extract

You can download the C client package manually from the [Download](https://aerospike.com/download/client/c/) page. Make sure to read the [release notes](https://github.com/aerospike/aerospike-client-c/releases) of the version you are downloading. Alternatively, you can automate downloading versions of the C client package from the [artifact repository](https://download.aerospike.com/artifacts/aerospike-client-c/):

```plaintext
https://download.aerospike.com/artifacts/aerospike-client-c/<version>/
```

### C client version 6.3.0 and newer

Support for 64-bit ARM (ARMv8.2-A instruction set) was added in C client version 6.3.0, in parallel with the server 6.2.0 ARM support.

::: caution
The C client package naming was changed to align with the server and tools packages.
:::

`ARCH` platforms are based on `uname -m`, and include `x86_64`, `aarch64` (Graviton 2 and similar) and `arm64` (Apple M1).

-   [RHEL 8](#tab-panel-2577)
-   [RHEL 9](#tab-panel-2578)
-   [RHEL 10](#tab-panel-2579)

| Package | Description |
| --- | --- |
| aerospike-client-c\_<VERSION>\_el8\_<ARCH>.tgz | sync commands |
| aerospike-client-c-libuv\_<VERSION>\_el8\_<ARCH>.tgz | sync and async commands with libuv |
| aerospike-client-c-libev\_<VERSION>\_el8\_<ARCH>.tgz | sync and async commands with libev |
| aerospike-client-c-libevent\_<VERSION>\_el8\_<ARCH>.tgz | sync and async commands with libevent |

Extract the contents of the chosen package:

Terminal window

```bash
tar xvf <package>
```

### Example

Terminal window

```bash
tar xvf aerospike-client-c-libuv_7.4.1_el8_x86_64.tgz

cd aerospike-client-c-libuv_7.4.1_el8_x86_64
```

| Package | Description |
| --- | --- |
| aerospike-client-c\_<VERSION>\_el9\_<ARCH>.tgz | sync commands |
| aerospike-client-c-libuv\_<VERSION>\_el9\_<ARCH>.tgz | sync and async commands with libuv |
| aerospike-client-c-libev\_<VERSION>\_el9\_<ARCH>.tgz | sync and async commands with libev |
| aerospike-client-c-libevent\_<VERSION>\_el9\_<ARCH>.tgz | sync and async commands with libevent |

Extract the contents of the chosen package:

Terminal window

```bash
tar xvf <package>
```

### Example

Terminal window

```bash
tar xvf aerospike-client-c-libuv_7.4.1_el9_x86_64.tgz

cd aerospike-client-c-libuv_7.4.1_el9_x86_64
```

| Package | Description |
| --- | --- |
| aerospike-client-c\_<VERSION>\_el10\_<ARCH>.tgz | sync commands |
| aerospike-client-c-libuv\_<VERSION>\_el10\_<ARCH>.tgz | sync and async commands with libuv |
| aerospike-client-c-libev\_<VERSION>\_el10\_<ARCH>.tgz | sync and async commands with libev |
| aerospike-client-c-libevent\_<VERSION>\_el10\_<ARCH>.tgz | sync and async commands with libevent |

Extract the contents of the chosen package:

Terminal window

```bash
tar xvf <package>
```

### Example

Terminal window

```bash
tar xvf aerospike-client-c-libuv_7.4.1_el10_x86_64.tgz

cd aerospike-client-c-libuv_7.4.1_el10_x86_64
```

### Prior to C client version 6.3.0

-   [RHEL 8](#tab-panel-2573)

| Package | Description |
| --- | --- |
| aerospike-client-c-<VERSION>.el8.<ARCH>.tgz | sync commands |
| aerospike-client-c-libuv-<VERSION>.el8.<ARCH>.tgz | sync and async commands with libuv |
| aerospike-client-c-libev-<VERSION>.el8.<ARCH>.tgz | sync and async commands with libev |
| aerospike-client-c-libevent-<VERSION>.el8.<ARCH>.tgz | sync and async commands with libevent |

Extract the contents of the chosen package:

Terminal window

```bash
tar xvf <package>
```

### Example

Terminal window

```bash
tar xvf aerospike-client-c-libuv-6.2.1.el8.x86_64.tgz

cd aerospike-client-c-libuv-6.2.1.el8.x86_64
```

## Contents

The package contains the following installer packages:

-   [RHEL 8](#tab-panel-2566)
-   [RHEL 9](#tab-panel-2567)

-   `aerospike-client-c[-{EVENTLIB}]-devel-&lt;VERSION&gt;-1.el8.&lt;ARCH&gt;.rpm`
    
    Aerospike C client development (static library and header files) installer for given version and event framework library. This installer is used for developers when compiling/linking their applications with the Aerospike client library.
    
-   `aerospike-client-c[-{EVENTLIB}]-&lt;VERSION&gt;-1.el8.&lt;ARCH&gt;.rpm`
    
    Aerospike C client runtime (shared library) installer for given version and event framework library.
    

-   `aerospike-client-c[-{EVENTLIB}]-devel-&lt;VERSION&gt;-1.el9.&lt;ARCH&gt;.rpm`
    
    Aerospike C client development (static library and header files) installer for given version and event framework library. This installer is used for developers when compiling/linking their applications with the Aerospike client library.
    
-   `aerospike-client-c[-{EVENTLIB}]-&lt;VERSION&gt;-1.el9.&lt;ARCH&gt;.rpm`
    
    Aerospike C client runtime (shared library) installer for given version and event framework library.
    

## Install

Install one development package to compile your application with Aerospike client. Install corresponding runtime package to run your application with Aerospike client.

Terminal window

```bash
sudo rpm -i <installer package>
```

### Example

-   [RHEL 9](#tab-panel-2565)

Terminal window

```bash
sudo rpm -i aerospike-client-c-libuv-devel-7.4.1-1.el9.x86_64.rpm

sudo rpm -i aerospike-client-c-libuv-7.4.1-1.el9.x86_64.rpm
```

Development files install in:

-   `/usr/include/aerospike`
-   `/usr/include/citrusleaf`
-   `/usr/lib/libaerospike.a`

Runtime files install in:

-   `/usr/lib/libaerospike.so`

## Building Applications with Event Library

Event libraries usually install into /usr/local/lib. Most operating systems do not search /usr/local/lib by default. Therefore, the following `LD_LIBRARY_PATH` setting may be necessary.

Terminal window

```bash
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
```

When compiling your async applications with aerospike header files, the event library must be defined (`-DAS_USE_LIBUV` or `-DAS_USE_LIBEV` or `-DAS_USE_LIBEVENT`) on the command line or in an IDE. Example:

Terminal window

```bash
gcc -DAS_USE_LIBUV -o myapp myapp.c -laerospike -lev -lssl -lcrypto -lpthread -lm -lz
```

The Aerospike C client library requires the following libraries present on the machine to build and run.

| Library Name | .deb Package | Description |
| --- | --- | --- |
| libssl | libssl-dev |  |
| libcrypto | libssl-dev | Required for RIPEMD160 hash function. |

To install library prerequisites via `apt-get`:

Terminal window

```bash
sudo apt-get install libssl-dev
```

If asynchronous functionality is desired, one of the following event frameworks must be installed.

### [libuv 1.15.0+](https://docs.libuv.org)

libuv has excellent performance and supports all platforms. The client also supports async TLS (SSL) sockets when using libuv.

### [libev 4.24+](http://dist.schmorp.de/libev)

libev has excellent performance on Linux/macOS, but its Windows implementation is suboptimal. Therefore, the C client supports libev on Linux/macOS only. The client does support async TLS (SSL) sockets when using libev.

### [libevent 2.1.8+](http://libevent.org)

libevent is less performant than the other two options, but it does support all platforms. The client also supports async TLS (SSL) sockets when using libevent.

If a different event framework version is required, then the C client should be built from [source code](https://github.com/aerospike/aerospike-client-c) with that event framework version instead of following these pre-compiled library installation steps.

## Download and Extract

You can download the C client package manually from the [Download](https://aerospike.com/download/client/c/) page. Make sure to read the [release notes](https://github.com/aerospike/aerospike-client-c/releases) of the version you are downloading. Alternatively, you can automate downloading versions of the C client package from the [artifact repository](https://download.aerospike.com/artifacts/aerospike-client-c/):

```plaintext
https://download.aerospike.com/artifacts/aerospike-client-c/<version>/
```

### C client version 6.3.0 and newer

Support for 64-bit ARM (ARMv8.2-A instruction set) was added in C client version 6.3.0, in parallel with the server 6.2.0 ARM support.

::: caution
The C client package naming was changed to align with the server and tools packages.
:::

`ARCH` platforms are based on `uname -m`, and include `x86_64`, `aarch64` (Graviton 2 and similar) and `arm64` (Apple M1).

-   [Ubuntu 22](#tab-panel-2580)
-   [Ubuntu 24](#tab-panel-2581)

| Package | Description |
| --- | --- |
| aerospike-client-c\_<VERSION>\_ubuntu22.04\_<ARCH>.tgz | sync commands |
| aerospike-client-c-libuv\_<VERSION>\_ubuntu22.04\_<ARCH>.tgz | sync and async commands with libuv |
| aerospike-client-c-libev\_<VERSION>\_ubuntu22.04\_<ARCH>.tgz | sync and async commands with libev |
| aerospike-client-c-libevent\_<VERSION>\_ubuntu22.04\_<ARCH>.tgz | sync and async commands with libevent |

Extract the contents of the chosen package:

Terminal window

```bash
tar xvf <package>
```

### Example

Terminal window

```bash
tar xvf aerospike-client-c-libuv_6.3.0_ubuntu22.04_x86_64.tgz

cd aerospike-client-c-libuv_6.3.0_ubuntu22.04_x86_64
```

| Package | Description |
| --- | --- |
| aerospike-client-c\_<VERSION>\_ubuntu24.04\_<ARCH>.tgz | sync commands |
| aerospike-client-c-libuv\_<VERSION>\_ubuntu24.04\_<ARCH>.tgz | sync and async commands with libuv |
| aerospike-client-c-libev\_<VERSION>\_ubuntu24.04\_<ARCH>.tgz | sync and async commands with libev |
| aerospike-client-c-libevent\_<VERSION>\_ubuntu24.04\_<ARCH>.tgz | sync and async commands with libevent |

Extract the contents of the chosen package:

Terminal window

```bash
tar xvf <package>
```

### Example

Terminal window

```bash
tar xvf aerospike-client-c-libuv_6.6.2_ubuntu24.04_x86_64.tgz

cd aerospike-client-c-libuv_6.6.2_ubuntu24.04_x86_64
```

### Prior to C client version 6.3.0

-   [Ubuntu 22](#tab-panel-2574)

| Package | Description |
| --- | --- |
| aerospike-client-c-<VERSION>.ubuntu22.04.<ARCH>.tgz | sync commands |
| aerospike-client-c-libuv-<VERSION>.ubuntu22.04.<ARCH>.tgz | sync and async commands with libuv |
| aerospike-client-c-libev-<VERSION>.ubuntu22.04.<ARCH>.tgz | sync and async commands with libev |
| aerospike-client-c-libevent-<VERSION>.ubuntu22.04.<ARCH>.tgz | sync and async commands with libevent |

Extract the contents of the chosen package:

Terminal window

```bash
tar xvf <package>
```

### Example

Terminal window

```bash
tar xvf aerospike-client-c-libuv-6.2.1.ubuntu22.04.x86_64.tgz

cd aerospike-client-c-libuv-6.2.1.ubuntu22.04.x86_64
```

## Contents

The package contains two installers for the given architecture. The supported `DEB-ARCH` architectures are `amd64` (equivalent to x86\_64) and `arm64` (equivalent to aarch64).

-   [Ubuntu 22](#tab-panel-2568)
-   [Ubuntu 24](#tab-panel-2569)

-   `aerospike-client-c[-{EVENTLIB}]-devel_&lt;VERSION&gt;-ubuntu22.04_{DEB-ARCH}.deb`
    
    Aerospike C client development (static library and header files) installer for given version and event framework library. This installer is used for developers when compiling/linking their applications with the Aerospike client library.
    
-   `aerospike-client-c[-{EVENTLIB}]_&lt;VERSION&gt;-ubuntu22.04_{DEB-ARCH}.deb`
    
    Aerospike C client runtime (shared library) installer for given version and event framework library.
    

-   `aerospike-client-c[-{EVENTLIB}]-devel_&lt;VERSION&gt;-ubuntu24.04_{DEB-ARCH}.deb`
    
    Aerospike C client development (static library and header files) installer for given version and event framework library. This installer is used for developers when compiling/linking their applications with the Aerospike client library.
    
-   `aerospike-client-c[-{EVENTLIB}]_&lt;VERSION&gt;-ubuntu24.04_{DEB-ARCH}.deb`
    
    Aerospike C client runtime (shared library) installer for given version and event framework library.
    

## Install

Install one development package to compile your application with the Aerospike client. Install the corresponding runtime package to run your application with the Aerospike client.

Terminal window

```bash
sudo dpkg -i <installer package>
```

### Example

-   [Ubuntu 22](#tab-panel-2570)
-   [Ubuntu 24](#tab-panel-2571)

Terminal window

```bash
sudo dpkg -i aerospike-client-c-libuv-devel_6.3.0-ubuntu22.04_x86_64.deb

sudo dpkg -i aerospike-client-c-libuv_6.3.0-ubuntu22.04_x86_64.deb
```

Terminal window

```bash
sudo dpkg -i aerospike-client-c-libuv-devel_6.6.2-ubuntu24.04_x86_64.deb

sudo dpkg -i aerospike-client-c-libuv_6.6.2-ubuntu24.04_x86_64.deb
```

Development files install in:

-   `/usr/include/aerospike`
-   `/usr/include/citrusleaf`
-   `/usr/lib/libaerospike.a`

Runtime files install in:

-   `/usr/lib/libaerospike.so`

## Building Applications with Event Library

Event libraries usually install into /usr/local/lib. Most operating systems do not search /usr/local/lib by default. Therefore, the following `LD_LIBRARY_PATH` setting may be necessary.

Terminal window

```bash
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
```

When compiling your async applications with aerospike header files, the event library must be defined (`-DAS_USE_LIBUV` or `-DAS_USE_LIBEV` or `-DAS_USE_LIBEVENT`) on the command line or in an IDE. Example:

Terminal window

```bash
gcc -DAS_USE_LIBUV -o myapp myapp.c -laerospike -lev -lssl -lcrypto -lpthread -lm -lz
```

## Prerequisites

Meet the following prerequisites before installing the Aerospike C client:

-   M1 Macs
    -   macOS 12.0+
    -   Xcode 13.4.1+
-   Intel Macs
    -   macOS 10.9+
    -   XCode 8.2.1+

If asynchronous functionality is desired, one of the following event frameworks must be installed.

### [libuv 1.15.0+](http://docs.libuv.org)

libuv has excellent performance and supports all platforms. The client also supports async TLS (SSL) sockets when using libuv.

### [libev 4.24+](http://dist.schmorp.de/libev)

libev has excellent performance on Linux/macOS, but its Windows implementation is suboptimal. Therefore, the C client supports libev on Linux/macOS only. The client does support async TLS (SSL) sockets when using libev.

### [libevent 2.1.8+](http://libevent.org)

libevent is less performant than the other two options, but it does support all platforms. The client also supports async TLS (SSL) sockets when using libevent.

If a different event framework version is required, then the C client should be built from [source code](https://github.com/aerospike/aerospike-client-c) with that event framework version instead of following these pre-compiled library installation steps.

## Download and Extract

You can download the C client package manually from the [Download](https://aerospike.com/download/client/c/) page. Make sure to read the [release notes](https://github.com/aerospike/aerospike-client-c/releases) of the version you are downloading. Alternatively, you can automate downloading versions of the C client package from the [artifact repository](https://download.aerospike.com/artifacts/aerospike-client-c/):

```plaintext
https://download.aerospike.com/artifacts/aerospike-client-c/<version>/
```

### C client version 6.3.0 and newer

Support for 64-bit ARM (ARMv8.2-A instruction set) was added in C client version 6.3.0, in parallel with the server 6.2.0 ARM support.

::: caution
The C client package naming was changed to align with the server and tools packages.
:::

`ARCH` platforms are based on `uname -m`, and include `x86_64` and `arm64` (Apple M1).

| Package | Description |
| --- | --- |
| aerospike-client-c\_<VERSION>\_mac\_<ARCH>.tgz | sync commands |
| aerospike-client-c-libuv\_<VERSION>\_mac\_<ARCH>.tgz | sync and async commands with libuv |
| aerospike-client-c-libev\_<VERSION>\_mac\_<ARCH>.tgz | sync and async commands with libev |
| aerospike-client-c-libevent\_<VERSION>\_mac\_<ARCH>.tgz | sync and async commands with libevent |

Extract the contents of the chosen package:

Terminal window

```bash
tar xvf <package>
```

Example

Terminal window

```bash
tar xvf aerospike-client-c-libuv_6.3.0_mac_arm64.tgz

cd aerospike-client-c-libuv_6.3.0_mac_arm64
```

### Prior to C client version 6.3.0

| Package | Description |
| --- | --- |
| aerospike-client-c-<VERSION>.mac.<ARCH>.tgz | sync commands |
| aerospike-client-c-libuv-<VERSION>.mac.<ARCH>.tgz | sync and async commands with libuv |
| aerospike-client-c-libev-<VERSION>.mac.<ARCH>.tgz | sync and async commands with libev |
| aerospike-client-c-libevent-<VERSION>.mac.<ARCH>.tgz | sync and async commands with libevent |

Extract the contents of the chosen package:

Terminal window

```bash
tar xvf <package>
```

Example

Terminal window

```bash
tar xvf aerospike-client-c-libuv-6.2.1.mac.x86_64.tgz

cd aerospike-client-c-libuv-6.2.1.mac.x86_64
```

## Contents

The package contains the following installer packages:

-   `aerospike-client-c[-{EVENTLIB}]-devel-&lt;VERSION&gt;-&lt;ARCH&gt;.pkg`
    
    Aerospike C client development (static library and header files) installer for given version and event framework library. This installer is used for developers when compiling/linking their applications with the Aerospike client library.
    
-   `aerospike-client-c[-{EVENTLIB}]-&lt;VERSION&gt;-&lt;ARCH&gt;.pkg`
    
    Aerospike C client runtime (shared library) installer for given version and event framework library.
    

### Example

Terminal window

```bash
aerospike-client-c-libuv-devel-6.3.0-arm64.pkg
```

## Install

Install one development package to compile your application with the Aerospike client. Install the corresponding runtime package to run your application with the Aerospike client.

-   Double-click on the installer package in a Finder window.

A message may appear that the package is from an unidentified developer and can’t be opened. If that message appears, follow these steps:

1.  Click **OK**.
2.  Right-click or Ctrl-click the package icon, and select **Open** in the context menu.
3.  Click **Open** in the confirmation dialog box.

Then, follow the installation prompts.

Development files install in:

-   `/usr/local/include/aerospike`
-   `/usr/local/include/citrusleaf`
-   `/usr/local/lib/libaerospike.a`

Runtime files install in:

-   `/usr/local/lib/libaerospike.dylib`

## Building Applications with Event Library

Event libraries usually install into /usr/local/lib. Most operating systems do not search /usr/local/lib by default. Therefore, the following `LD_LIBRARY_PATH` setting may be necessary.

Terminal window

```bash
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
```

When compiling your async applications with aerospike header files, the event library must be defined (`-DAS_USE_LIBUV` or `-DAS_USE_LIBEV` or `-DAS_USE_LIBEVENT`) on the command line or in an IDE. Example:

Terminal window

```bash
gcc -DAS_USE_LIBUV -o myapp myapp.c -laerospike -lev -lssl -lcrypto -lpthread -lm -lz
```

## Prerequisites

Meet the following prerequisites before installing the Aerospike C client:

-   Windows 7+.
-   Visual Studio 2017+.

If asynchronous functionality is desired, one of the following event frameworks should be chosen. The Windows version of these event libraries are bundled with the C client package and do not need to be installed separately.

### [libuv 1.15.0](https://docs.libuv.org)

libuv has excellent performance and supports all platforms. The client also supports async TLS (SSL) sockets when using libuv.

### [libevent 2.1.8](http://libevent.org)

libevent is less performant, but it does support all platforms. The client also supports async TLS (SSL) sockets when using libevent.

## Install from NuGet

C client Windows packages can be installed from [NuGet](https://www.nuget.org/packages?q=aerospike-client-c).

-   In Visual Studio’s Solution Explorer, Right-click on your project and choose “Manage NuGet Packages…”.
-   Click “Browse” and enter “aerospike-client-c” in your search box.
-   Click on one of the following packages.

| Package | Description |
| --- | --- |
| aerospike-client-c-<VERSION> | sync commands |
| aerospike-client-c-libuv-<VERSION> | sync and async commands with libuv |
| aerospike-client-c-libevent-<VERSION> | sync and async commands with libevent |

-   Click `Install`
-   Click `OK`

Libraries and header files install in:

-   `packages/aerospike-client-c[-{EVENTLIB}]-&lt;VERSION&gt;/build/native`

## Install from Custom Client Build

If installing from a custom C client build (not NuGet install), additional configuration steps are required.

-   Define these preprocessor macros in your application project.

| Type | Macros |
| --- | --- |
| sync | AS\_SHARED\_IMPORT;\_CRT\_SECURE\_NO\_DEPRECATE;\_TIMESPEC\_DEFINED |
| sync and async with libuv | AS\_USE\_LIBUV;USING\_UV\_SHARED;AS\_SHARED\_IMPORT;\_CRT\_SECURE\_NO\_DEPRECATE;\_TIMESPEC\_DEFINED |
| sync and async with libevent | AS\_USE\_LIBEVENT;EVENT\_\_NEED\_DLLIMPORT;AS\_SHARED\_IMPORT;\_CRT\_SECURE\_NO\_DEPRECATE;\_TIMESPEC\_DEFINED |

-   Disable 4996 warning.
    
-   Use aerospike.lib and optional async library (libuv.lib or event\_core.lib) and define directory where these libraries exists.