A newer version of this documentation is available.

View Latest

Install Couchbase Lite for C

      +

      Description — Installing Couchbase Lite for C

      Steps in Getting Started

      Install | Build and Run

      Download

      Couchbase Lite for C 3.0.0 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 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.

      • For Android, a ready-to-adapt, skeleton application project.

      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.

      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

        • curl

        • wget

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

        • apt

        • dpkg

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

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

        • Enterprise

        • Community

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

      That’s it. 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:

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

          sudo apt install ./libcblite
          
          sudo apt install ./libcblite-dev
      3. That’s it.
        You just 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 for Windows

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

      1. Download and extract the release package — see: Extend with Mobile

      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 for macOS

      Direct access from Swift to Couchbase Lite for C is not possible in this release [1], but will be available in the next release.
      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 for iOS

      Direct access from Swift to Couchbase Lite for C is not possible in this release [2], but will be available in the next release.
      Install with Homebrew

      brew install libcblite-community

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

      1. Download and extract the release package here — Extend with Mobile.

      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 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 — Extend with Mobile

      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.

      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.

      Android

      API x86 x64 ARM 32 ARM 64

      22+

      yes

      yes

      yes

      yes

      iOS

      Version x86 x64 ARM 32 ARM 64

      10+

      yes

      yes

      yes

      yes

      Mac OS

      Version x64 ARM 64

      OSX 10.14 (Mojave)

      yes

      yes

      Linux

      Distro Version x64 ARM 32 ARM 64

      Debian

      9

      yes

      yes

      yes

      10

      yes

      yes

      yes

      Raspberry Pi OS

      10

      yes

      yes

      Raspbian

      9

      yes

      Ubuntu

      20.04

      yes

      yes

      yes

      Windows

      Version x64

      Desktop

      10+

      yes

      Download Links

      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.

      Release 3.0.15

      Available platforms are:

      Debian

      Download link table
      • Enterprise Edition

      • Community Edition

      Raspbian

      Download link table
      • Enterprise Edition

      • Community Edition

      Ubuntu

      Download link table
      • Enterprise Edition

      • Community Edition

      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.

      Release 3.0.2

      Available platforms are:

      Debian

      Download link table
      • Enterprise Edition

      • Community Edition

      Raspbian

      Download link table
      • Enterprise Edition

      • Community Edition

      Ubuntu

      Download link table
      • Enterprise Edition

      • Community Edition

      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.

      Release 3.0.0

      Available platforms are:

      Debian

      Download link table
      • Enterprise Edition

      • Community Edition

      Raspbian

      Download link table
      • Enterprise Edition

      • Community Edition

      Ubuntu

      Download link table
      • Enterprise Edition

      • Community Edition


      1. 3.0
      2. 3.0