---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.4
alternate:
  - https://ydb.tech/docs/en/reference/ydb-sdk/install.md
  - https://ydb.tech/docs/ru/reference/ydb-sdk/install.md
sourcePath: en/core/reference/ydb-sdk/install.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ydb.tech/docs/en/llms.txt


<!-- source: en/reference/ydb-sdk/_includes/install.md -->
# Installing the YDB SDK

<!-- markdownlint-disable blanks-around-fences -->

Follow the instructions below to quickly install the OpenSource SDK. Make sure to preinstall and configure tools for working with the selected programming language and package managers on your workstation.

The build process using the source code is described in the source code repositories on GitHub. Follow the links given on the [YDB SDK - Overview](https://ydb.tech/docs/en/reference/ydb-sdk/index.md) page.

{% list tabs %}

- Go

  Run the command from the command line:

  <!-- source: en/reference/ydb-sdk/_includes/install/cmd_go.md -->
  ``` bash
  go get -u github.com/ydb-platform/ydb-go-sdk/v3
  ```
  <!-- endsource: en/reference/ydb-sdk/_includes/install/cmd_go.md -->

  To ensure that the installation is successful, make sure that your environment is running [Go](https://go.dev/doc/install) 1.17 or higher.

- Java

  Add dependencies to the Maven project as described in the ["Install the SDK"](https://github.com/ydb-platform/ydb-java-sdk#install-the-sdk) step of the `readme.md` file in the source code repository.

- Python

  Run the command from the command line:

  <!-- source: en/reference/ydb-sdk/_includes/install/cmd_python.md -->
  ``` bash
  python3 -m pip install ydb
  ```
  <!-- endsource: en/reference/ydb-sdk/_includes/install/cmd_python.md -->

  If the command fails, make sure your environment has [Python](https://www.python.org/downloads/) 3.8 or newer installed with the [pip](https://pypi.org/project/pip/) package manager enabled.

- C# (.NET)

  <!-- source: en/reference/ydb-sdk/_includes/install/cmd_dotnet.md -->
  ``` bash
  dotnet add package Ydb.Sdk
  ```
  <!-- endsource: en/reference/ydb-sdk/_includes/install/cmd_dotnet.md -->

- JavaScript

  <!-- source: en/reference/ydb-sdk/_includes/install/cmd_npm.md -->
  ```bash
  npm install @ydbjs/core @ydbjs/query
  ```
  <!-- endsource: en/reference/ydb-sdk/_includes/install/cmd_npm.md -->

  The minimum supported [Node.js®](https://nodejs.org/en/download) version is 20.19.

- Rust

  <!-- source: en/reference/ydb-sdk/_includes/install/cmd_rust.md -->
  Add to Cargo.toml last version of [ydb](https://crates.io/crates/ydb) crate.
  <!-- endsource: en/reference/ydb-sdk/_includes/install/cmd_rust.md -->

- C++

  ### Debian packages (Ubuntu 24.04)

  Pre-built `.deb` packages for Ubuntu 24.04 (Noble), amd64 are attached to each [GitHub release](https://github.com/ydb-platform/ydb-cpp-sdk/releases). Download and install them locally:

  <!-- source: en/reference/ydb-sdk/_includes/install/cmd_cpp_deb.md -->
  ``` bash
  # Replace <TAG> with a release tag from GitHub releases
  TAG=<TAG>
  BASE="https://github.com/ydb-platform/ydb-cpp-sdk/releases/download/${TAG}"

  wget "${BASE}/yandex-googleapis-api-common-protos-1.0.0-Linux.deb"
  wget "${BASE}/libydb-cpp-dev_${TAG#v}_amd64.deb"
  # Optional plugins:
  wget "${BASE}/libydb-cpp-iam-dev_${TAG#v}_amd64.deb"
  wget "${BASE}/libydb-cpp-otel-metrics-dev_${TAG#v}_amd64.deb"
  wget "${BASE}/libydb-cpp-otel-tracing-dev_${TAG#v}_amd64.deb"

  sudo apt-get update
  sudo apt-get install -y \
      ./yandex-googleapis-api-common-protos-*.deb \
      ./libydb-cpp-dev_*.deb ./libydb-cpp-iam-dev_*.deb \
      ./libydb-cpp-otel-metrics-dev_*.deb ./libydb-cpp-otel-tracing-dev_*.deb
  ```
  <!-- endsource: en/reference/ydb-sdk/_includes/install/cmd_cpp_deb.md -->

  Available packages:

  - `yandex-googleapis-api-common-protos` — required protobuf dependency;
  - `libydb-cpp-dev` — core SDK: static library, public headers, and CMake package files;
  - `libydb-cpp-iam-dev` — IAM credentials plugin (optional);
  - `libydb-cpp-otel-metrics-dev` — OpenTelemetry metrics plugin (optional);
  - `libydb-cpp-otel-tracing-dev` — OpenTelemetry tracing plugin (optional; requires `libydb-cpp-otel-metrics-dev` for OTel headers and libraries).

  {% note info %}

  - Supported platform: Ubuntu 24.04 (Noble), amd64.
  - The `.deb` packages do not declare apt dependencies on each other; install `yandex-googleapis-api-common-protos` together with the core SDK package.
  - For other platforms, use the build-from-source instructions below.

  {% endnote %}

  ### Using the SDK in CMake

  After installing the packages, use the SDK in your CMake project:

  <!-- source: en/reference/ydb-sdk/_includes/install/cmd_cpp_cmake.md -->
  ``` cmake
  find_package(ydb-cpp-sdk REQUIRED COMPONENTS Driver Table Topic)
  target_link_libraries(myapp PRIVATE YDB-CPP-SDK::Driver YDB-CPP-SDK::Table)
  ```
  <!-- endsource: en/reference/ydb-sdk/_includes/install/cmd_cpp_cmake.md -->

  Pass `-DCMAKE_PREFIX_PATH=/usr/share/yandex` when configuring your project, since the packages install under the Yandex prefix.

  ### Build from source

  Clone the [ydb-cpp-sdk](https://github.com/ydb-platform/ydb-cpp-sdk) repository and run the following commands from the command line:

  <!-- source: en/reference/ydb-sdk/_includes/install/cmd_cpp_build.md -->
  ``` bash
  cmake --preset release-${compiler} -D YDB_SDK_INSTALL=On
  cmake --build --preset default
  cmake --install build --prefix ${ydb_install_dir}
  ```
  <!-- endsource: en/reference/ydb-sdk/_includes/install/cmd_cpp_build.md -->

  - `compiler` — your compiler (`clang` or `gcc`);
  - `ydb_install_dir` — the path where you want to install the SDK.

  Make sure all dependencies are installed before running the commands. See the [README](https://github.com/ydb-platform/ydb-cpp-sdk/blob/main/README.md) in the source repository for the full list of build dependencies and instructions.

- PHP

  <!-- source: en/reference/ydb-sdk/_includes/install/cmd_php.md -->
  ``` bash
  composer require ydb-platform/ydb-php-sdk
  ```
  <!-- endsource: en/reference/ydb-sdk/_includes/install/cmd_php.md -->

{% endlist %}
<!-- endsource: en/reference/ydb-sdk/_includes/install.md -->
