March 23, 2025
+ 12

Description — Installing Couchbase Lite for C

Steps in Getting Started

Install | Build and Run

Download

Couchbase Lite for C 3.2.2 is available for all supported platforms — see: Platform Availability.

You can obtain the downloads here:

The binary release download comprises a root directory (libcblite-community), which contains:

  • For Linux, Windows, Android, and Mac OS:

    • lib —  the core library binaries

    • include —  the header files for inclusion

    • bin — the Couchbase Lite for C .dll files (Microsoft  Windows-only) .

  • For iOS, an xcframework.

Debug Symbols

Debug symbol versions are available for all desktop variants of C (Windows, macOS, Debian, Ubuntu and Raspbian) - see: downloads table.

For Android and iOS the symbols are incorporated in the standard release package.

You can obtain the download for the Vector Search extension here:

To use Vector Search, you must have Couchbase Lite installed and add the Vector Search extension to your Couchbase Lite application. Vector Search is available only for 64-bit architectures and Intel processors that support the Advanced Vector Extensions 2 (AVX2) instruction set. To verify whether your device supports the AVX2 instructions set, follow these instructions.

Install for Linux

Using APT

Using the Advanced Package Tool (apt) is the easiest way to install Couchbase Lite on Ubuntu and Debian platforms. Just download the meta package that apt requires to automatically get and install Couchbase Lite, including any dependencies.

  1. Download the meta package

    bash
    curl -O https://packages.couchbase.com/releases/couchbase-release/couchbase-1.0-noarch.deb
  2. Install the meta package

    bash
    sudo apt install ./couchbase-1.0-noarch.deb
  3. Update the local package database

    bash
    sudo apt update
  4. Install the required release package(s)

    Runtime Only
    bash
    sudo apt install libcblite
    Development
    bash
    sudo apt install libcblite-dev

At this point, you are ready to start building the Getting Started app, or doing your own thing with Couchbase Lite for C

Using .deb Package

Use your package manager to install from a local .deb file.

  1. Just wget the appropriate .deb package  — see downloads table for a package URL.

  2. Install the package and its dependency, using apt install

    • For community version:

      bash
      sudo apt install ./libcblite-community sudo apt install ./libcblite-dev-community
    • For enterprise version:

      bash
      sudo apt install ./libcblite sudo apt install ./libcblite-dev
  3. From here, you need to pass the -lcblite command-line flag to the compiler when you build.

At this point, you are ready to start building the Getting Started app, or doing your own thing with Couchbase Lite for C

Install Vector Search for Linux

Before you can use Vector Search, you must download and install the Vector Search library to the location in your project where the library can be accessed and loaded at run time. The Vector Search extension for the C platform ships with supported prebuilt libraries containing the required dependencies.

You need to set the LD_LIBRARIES_PATH to the extension location instead of installing the libraries yourself.

In the code, before opening the database and using the vector search extension, you must call the CBL_SetExtensionPath function shown below to set the path to the installed location of the vector search library.

CBLError error {};
if (!CBL_EnableVectorSearch(FLStr("/path/to/extension_dir"), &error)) {
    throw std::domain_error("Invalid / Not Found Extension Library");
}

Install for Windows

To install the Couchbase for C libraries on Windows from a downloaded release binary:

  1. Download and extract the release package — see: Mobile & Edge

  2. From within the root directory, libcblite-community, deploy the lib, include and bin libraries to a location accessible to your compiler.

  3. Within Visual Studio:

    1. Create a new C++ project

      Be sure to select x64 for 64-bit builds

    2. Within Project PropertiesC++ directoriesLibrary Directories, Add <path-to-deployed-directories>/lib

    3. Within Project PropertiesC++ directoriesInclude Directories, Add <path-to-deployed-directories>/include

    4. Within Project PropertiesLinkerInputAdditional Dependencies, Add cblite.lib

  4. Copy <path-to-deployed-directories>/bin/cblite.dll to your build location

    Couchbase Lite for C does not have any preferred installation path for the .dll. It is up to you to determine where best to place it so it is available during execution, though copying to a location on the system path is not recommended on Windows

Install Vector Search for Windows

To use the Vector Search extension:

  1. Download and extract the Vector Search extension.

  2. Put the library in your development environment.

In the code, before opening the database and using the vector search extension, you must call the CBL_SetExtensionPath function shown below to set the path to the installed location of the vector search library.

CBLError error {};
if (!CBL_EnableVectorSearch(FLStr("/path/to/extension_dir"), &error)) {
    throw std::domain_error("Invalid / Not Found Extension Library");
}
Couchbase Lite Vector Search does not have any preferred installation path for the .dll. It is up to you to determine where best to place it so it is available during execution.

Install for macOS

Install with Homebrew

Simplified installation using Homebrew

  • brew install libcblite

  • brew install libcblite-community

To install the Couchbase for C libraries on macOS from a downloaded release package:

  1. Download and extract the release package here — downloads table.

  2. Optionally …​ From within the root directory, libcblite-community, Copy the include and lib directories to /usr/local/

  3. Within Xcode:

    1. Create a new project

    2. Add <path/to>/include to the project’s Header Search Path

    3. Add <path/to>/lib to the project’s Library Search Path

    4. Drag libcblite-community.dylib into your Xcode project. Then, within the dialog:

      1. Select Create Directory References If Needed

      2. Check the correct target is selected

At this point, you are ready to start building the Getting Started app, or doing your own thing with Couchbase Lite for C

Install Vector Search for macOS

Before you can use Vector Search, you must download and install the Vector Search library to the location in your project where the library can be accessed and loaded at run time. The Vector Search extension for the C platform ships with supported prebuilt libraries containing the required dependencies.

In the code, before opening the database and using the vector search extension, you must call the CBL_SetExtensionPath function shown below to set the path to the installed location of the vector search library.

CBLError error {};
if (!CBL_EnableVectorSearch(FLStr("/path/to/extension_dir"), &error)) {
    throw std::domain_error("Invalid / Not Found Extension Library");
}

Install for iOS

To install the Couchbase for C libraries for iOS from a downloaded release package:

  1. Download and extract the release package here — Mobile & Edge

  2. Drag CouchbaseLite.xcframework into your Xcode project, then within the dialog:

    1. Select Create Directory References If Needed

    2. Check the correct target is selected

At this point, you are ready to start building the Getting Started app, or doing your own thing with Couchbase Lite for C

If you encounter a build error — Include of non-modular header inside framework module — You may need to change the build setting allow non-modular includes in framework module to Yes.

Install Vector Search for iOS

  1. Download and extract the Vector Search extension into your XCode project location.

  2. Select your target settings in XCode and drag CouchbaseLiteVectorSearch.xcframework from your Finder to the Frameworks, Libraries, and Embedded Content section.

  3. Import the xcframework and start using it in your project.

objective-c
[NSBundle bundleWithIdentifier: "com.couchbase.vectorSearchExtension"].bundlePath

You can then set the extension path with the snippet below.

CBLError error {};
if (!CBL_EnableVectorSearch(FLStr("/path/to/extension_dir"), &error)) {
    throw std::domain_error("Invalid / Not Found Extension Library");
}

Install for Android

This install assumes use of the Android Studio IDE. In addition to the Couchbase Lite for C download you also require the following tool chain dependencies, all installable from within Android Studio if necessary:

  • CMake 3.18.1

  • NDK 21.4.7075529

  • Build tools 30.0.2

In this instance the release comprises a ready to adapt application project.

  1. Download and Unpack the binary release here — Mobile & Edge

  2. Within Android Studio, select and open the project folder (within the libcblite-community folder)

  3. Tools  SDK Manager  SDK Tools

  4. Check the above dependencies are installed, select any that are not
    OK to Continue

Once the install is finished, you can build and run this skeleton app.

Install Vector Search for Android

To use Vector Search in your Android applications, follow the steps below:

  1. Download and extract the Vector Search extension into your project location.

  2. The package must be installed to the location in your project where the library can be accessed and loaded while the executable is running.

    1. The Vector Search download for CBL-C only contains the Vector Search libraries needed to include in your app.

    2. Steps to include the prebuilt native library can be found here.

  3. Create a Android app project in Android Studio

  4. The location of the native library can be found using the following snippet:

java
String getExtensionPath(Context context) { String packagePath = context.getPackageResourcePath(); if (packagePath == null) { return null; } String arch = getArch(); if (arch == null) { return null; } return packagePath + "!/lib/" + arch; // "!" is important for locating non-extracted library. } String getArch() { final List<String> abis = Arrays.asList(Build.SUPPORTED_ABIS); if (abis.contains()) { return "arm64-v8a"; } if (abis.contains("x86_64")) { return "x86_64"; } return null; }

In the code, before opening the database and using the vector search extension, you must call the CBL_SetExtensionPath function shown below to set the path to the installed location of the vector search library.

CBLError error {};
if (!CBL_EnableVectorSearch(FLStr("/path/to/extension_dir"), &error)) {
    throw std::domain_error("Invalid / Not Found Extension Library");
}

At this point, you are ready to start building the Getting Started app, or doing your own thing with Couchbase Lite for C

Platform Availability

Couchbase Lite for C is available on the platforms shown in the tables below.

Deprecation Notice

Support for the following will be deprecated in this release and will be removed in a future release:

  • macOS 12 (Monterey)

  • Ubuntu - 20.04 LTS

  • Raspbian - 9

  • Debian 9, 10

Please plan to migrate your apps to use an appropriate alternative version.

Android

API x86 x64 ARM 32 ARM 64

22+

yes

yes

yes

yes

iOS

Version x86 x64 ARM 32 ARM 64

12+

yes

yes

yes

yes

macOS

Version x64 ARM 64

macOS 14 (Sonoma)

yes

yes

macOS 13 (Ventura)

yes

yes

macOS 12 (Monterey)

yes

yes

Linux

Distro Version x64 ARM 32 ARM 64

Debian

9

yes

yes

yes

10 (Buster)

yes

yes

yes

11 (Bullseye)

yes

yes

yes

12 (Bookworm)

yes

yes

yes

Raspberry Pi OS

10

yes

yes

Raspbian

9

yes

Ubuntu

20.04 LTS

yes

yes

yes

22.04 LTS

yes

yes

yes

Embedded Linux

Distro Version x64 ARM 32 ARM 64

Debian

9

yes

yes

yes

10 (Buster)

yes

yes

yes

11 (Bullseye)

yes

yes

yes

12 (Bookworm)

yes

yes

yes

Raspberry Pi OS

10

yes

yes

Raspbian

9

yes

Ubuntu

20.04 LTS

yes

yes

yes

22.04 LTS

yes

yes

yes

Windows

Version x64

Desktop

10+

yes

Download Links

Couchbase Lite Release 3.2.1

Couchbase Lite for C is available for all Supported Platforms. You can obtain downloads for Linux and macOS from the links here in the downloads table. Ensure you select the correct package for your application’s compiler and architecture.

Alternatively, check the install page for instructions on how to get the software using a package manager.

Available platforms are:

Windows

Download link table

Debian

Download link table
Platform Download SHA Debug Symbols

Debian

couchbase-lite-c-enterprise-3.2.1-linux-arm64.tar.gz

couchbase-lite-c-enterprise-3.2.1-linux-arm64.tar.gz.sha256

couchbase-lite-c-enterprise-3.2.1-linux-arm64-symbols.tar.gz

couchbase-lite-c-enterprise-3.2.1-linux-armhf.tar.gz

couchbase-lite-c-enterprise-3.2.1-linux-armhf.tar.gz.sha256

couchbase-lite-c-enterprise-3.2.1-linux-armhf-symbols.tar.gz

couchbase-lite-c-enterprise-3.2.1-linux-x86_64.tar.gz

couchbase-lite-c-enterprise-3.2.1-linux-x86_64.tar.gz.sha256

couchbase-lite-c-enterprise-3.2.1-linux-x86_64-symbols.tar.gz

libcblite-enterprise_3.2.1-debian11_amd64.deb

libcblite-enterprise_3.2.1-debian11_amd64.deb.sha256

libcblite-dev-enterprise_3.2.1-debian11_amd64.deb

libcblite-dev-enterprise_3.2.1-debian11_amd64.deb.sha256

libcblite-enterprise_3.2.1-debian11_arm64.deb

libcblite-enterprise_3.2.1-debian11_arm64.deb.sha256

libcblite-dev-enterprise_3.2.1-debian11_arm64.deb

libcblite-dev-enterprise_3.2.1-debian11_arm64.deb.sha256

libcblite-enterprise_3.2.1-debian11_armhf.deb

libcblite-enterprise_3.2.1-debian11_armhf.deb.sha256

libcblite-dev-enterprise_3.2.1-debian11_armhf.deb

libcblite-dev-enterprise_3.2.1-debian11_armhf.deb.sha256

libcblite-enterprise_3.2.1-debian10_amd64.deb

libcblite-enterprise_3.2.1-debian10_amd64.deb.sha256

libcblite-dev-enterprise_3.2.1-debian10_amd64.deb

libcblite-dev-enterprise_3.2.1-debian10_amd64.deb.sha256

libcblite-enterprise_3.2.1-debian10_arm64.deb

libcblite-enterprise_3.2.1-debian10_arm64.deb.sha256

libcblite-dev-enterprise_3.2.1-debian10_arm64.deb

libcblite-dev-enterprise_3.2.1-debian10_arm64.deb.sha256

libcblite-enterprise_3.2.1-debian10_armhf.deb

libcblite-enterprise_3.2.1-debian10_armhf.deb.sha256

libcblite-dev-enterprise_3.2.1-debian10_armhf.deb

libcblite-dev-enterprise_3.2.1-debian10_armhf.deb.sha256

libcblite-enterprise_3.2.1-debian9_amd64.deb

libcblite-enterprise_3.2.1-debian9_amd64.deb.sha256

libcblite-dev-enterprise_3.2.1-debian9_amd64.deb

libcblite-dev-enterprise_3.2.1-debian9_amd64.deb.sha256

libcblite-enterprise_3.2.1-debian9_armhf.deb

libcblite-enterprise_3.2.1-debian9_armhf.deb.sha256

libcblite-dev-enterprise_3.2.1-debian9_armhf.deb

libcblite-dev-enterprise_3.2.1-debian9_armhf.deb.sha256

Ubuntu

Download link table
Platform Download SHA Debug Symbols

Ubuntu

couchbase-lite-c-enterprise-3.2.1-linux-arm64.tar.gz

couchbase-lite-c-enterprise-3.2.1-linux-arm64.tar.gz.sha256

couchbase-lite-c-enterprise-3.2.1-linux-arm64-symbols.tar.gz

couchbase-lite-c-enterprise-3.2.1-linux-armhf.tar.gz

couchbase-lite-c-enterprise-3.2.1-linux-armhf.tar.gz.sha256

couchbase-lite-c-enterprise-3.2.1-linux-armhf-symbols.tar.gz

couchbase-lite-c-enterprise-3.2.1-linux-x86_64.tar.gz

couchbase-lite-c-enterprise-3.2.1-linux-x86_64.tar.gz.sha256

couchbase-lite-c-enterprise-3.2.1-linux-x86_64-symbols.tar.gz

libcblite-enterprise_3.2.1-ubuntu22.04_amd64.deb

libcblite-enterprise_3.2.1-ubuntu22.04_amd64.deb.sha256

libcblite-dev-enterprise_3.2.1-ubuntu22.04_amd64.deb

libcblite-dev-enterprise_3.2.1-ubuntu22.04_amd64.deb.sha256

libcblite-enterprise_3.2.1-ubuntu22.04_arm64.deb

libcblite-enterprise_3.2.1-ubuntu22.04_arm64.deb.sha256

libcblite-dev-enterprise_3.2.1-ubuntu22.04_arm64.deb

libcblite-dev-enterprise_3.2.1-ubuntu22.04_arm64.deb.sha256

libcblite-enterprise_3.2.1-ubuntu22.04_armhf.deb

libcblite-enterprise_3.2.1-ubuntu22.04_armhf.deb.sha256

libcblite-dev-enterprise_3.2.1-ubuntu22.04_armhf.deb

libcblite-dev-enterprise_3.2.1-ubuntu22.04_armhf.deb.sha256

libcblite-enterprise_3.2.1-ubuntu20.04_amd64.deb

libcblite-enterprise_3.2.1-ubuntu20.04_amd64.deb.sha256

libcblite-dev-enterprise_3.2.1-ubuntu20.04_amd64.deb

libcblite-dev-enterprise_3.2.1-ubuntu20.04_amd64.deb.sha256

libcblite-enterprise_3.2.1-ubuntu20.04_arm64.deb

libcblite-enterprise_3.2.1-ubuntu20.04_arm64.deb.sha256

libcblite-dev-enterprise_3.2.1-ubuntu20.04_arm64.deb

libcblite-dev-enterprise_3.2.1-ubuntu20.04_arm64.deb.sha256

libcblite-enterprise_3.2.1-ubuntu20.04_armhf.deb

libcblite-enterprise_3.2.1-ubuntu20.04_armhf.deb.sha256

libcblite-dev-enterprise_3.2.1-ubuntu20.04_armhf.deb

libcblite-dev-enterprise_3.2.1-ubuntu20.04_armhf.deb.sha256

Raspbian

Please use the Debian .deb download choosing the appropriate version (debian9 or debian10) and architecture.

Vector Search Release 1.0.0

Couchbase Lite Vector Search - C is available for all Supported Platforms. You can obtain downloads for Linux and macOS from the links here in the downloads table. Ensure you select the correct package for your application’s compiler and architecture.

Alternatively, check the install page for instructions on how to get the software using a package manager.

Available platforms are:

You must have Couchbase Lite installed before you can use the Vector Search Extension. Vector Search is available only for 64-bit architectures. The Vector Search extension is an Enterprise-only feature.

MacOS

Download link table
Platform Download SHA

Debug Symbols

MacOS

couchbase-lite-vector-search-1.0.0-macos.zip

iOS