Ubuntu 22.04 安装 Apache Celix 指南

在 Ubuntu 22.04 上从零安装 Apache Celix 3.0 的完整指南,含依赖安装、源码编译、官方 2.4.0 发布包两种方案,最小 bundle 加载运行实测验证与卸载清理。

Apache CelixApache Celix2026/10/14

Ubuntu 22.04 安装 Apache Celix 指南

目标:在 Ubuntu 22.04 服务器上从零安装 Apache Celix(C/C++ 版 OSGi 运行时框架),包含依赖安装、源码编译、官方发布包两种安装方案,并编写最小 bundle 验证框架加载运行。本指南全部命令与回显已在 Ubuntu 22.04.5 LTS 实测通过。

一、环境信息

本节列出实测环境与核心版本,便于对照复现。本指南实测服务器配置如下:

项目实测值
操作系统Ubuntu 22.04.5 LTS(jammy)
内核架构x86_64
编译器gcc 11.4.0、g++ 11.4.0
CMake3.22.1
构建工具make 4.3、pkg-config 1.8.1
Apache Celix(主方案)3.0.0(源码构建,master 分支,提交 0fff190)
Apache Celix(备用方案)2.4.0(官方发布包)
安装前缀/opt/celix(3.0.0)、/opt/celix-2.4(2.4.0)
源码目录/opt/celix-src

二、前置条件

2.1 前置说明

Apache Celix 是 C/C++ 项目,不需要 JDK 与 Maven,但依赖一组合适的 C 编译工具链与动态库。本节先说明需要哪些前置,再给出安装命令与验证回显。

2.2 需要的软件与库

Celix 3.x 构建与运行所需的软件与库清单如下:

软件/库用途Ubuntu 包名
gcc/g++/makeC/C++ 编译工具链build-essential
cmake构建系统cmake
pkg-config依赖发现pkg-config
git拉取源码git
curl/wget下载发布包curl、wget
libzipbundle 压缩包处理libzip-dev
zlib压缩zlib1g-dev
libxml2XML 解析(bundle 描述)libxml2-dev
libffi动态函数调用(DFI)libffi-dev
libuv异步事件循环(utils 依赖)libuv1-dev
janssonJSON 解析libjansson-dev
czmqZeroMQ(RSA 远程服务)libczmq-dev
libcurlHTTP 客户端libcurl4-openssl-dev
uuid框架 UUID 生成uuid-dev
cpputest单元测试(可选,不装则禁用测试)libcpputest-dev

2.3 安装命令

使用 apt 一键安装上述依赖:

apt-get update
apt-get install -y build-essential cmake pkg-config git curl wget \
    libzip-dev zlib1g-dev libxml2-dev libffi-dev libuv1-dev \
    libjansson-dev libczmq-dev libcurl4-openssl-dev uuid-dev libcpputest-dev

2.4 验证依赖

逐个确认关键依赖版本:

gcc --version | head -1
cmake --version | head -1
dpkg -l | grep -E "libzip-dev|libffi-dev|libuv1-dev|libcpputest" | awk '{print $2, $3}'

实测回显(输出节选,实测首尾):

gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0
cmake version 3.22.1
libcpputest-dev:amd64 4.0-2
libffi-dev:amd64 3.4.2-4
libuv1-dev:amd64 1.43.0-1ubuntu0.1
libzip-dev:amd64 1.7.3-1ubuntu2

依赖齐备后即可进入源码编译安装。

三、版本选型说明

本节说明 Apache Celix 的版本现状与本文选型依据,避免读者对版本号产生误解。

3.1 版本现状

实测截至 2026-10,Apache Celix 的版本分布如下:

版本性质来源说明
3.0.0开发版(master 分支)github.com/apache/celix3.x 系列首个版本,框架库 SOVERSION 已升为 3
2.4.0最新正式发布版downloads.apache.org官方发布目录(celix-2.4.0.tar.gz)
2.3.0/2.2.x/2.1.x历史正式版downloads.apache.org2.x 系列

版本核验方法(本文实测采用):

# 查询官方发布目录
curl -s https://downloads.apache.org/celix/ | grep -oE 'celix-[0-9.]+' | sort -V | uniq
# 查询 GitHub 最新 tag
curl -s https://api.github.com/repos/apache/celix/tags?per_page=100 | grep '"name"' | head -5
# 查看 master 分支框架版本
curl -s https://raw.githubusercontent.com/apache/celix/master/CMakeLists.txt | grep -nE "CELIX_MAJOR|CELIX_MINOR|CELIX_MICRO" | head -5

实测回显(输出节选,实测首尾):

celix-2.4.0
celix-2.3.0
celix-2.2.1
celix-2.2.0
celix-2.1.0
celix-2.0.0

master 分支 CMakeLists.txt 中版本定义:

145:if (NOT DEFINED CELIX_MAJOR)
146:    set(CELIX_MAJOR "3")
147:    set(CELIX_MINOR "0")
148:    set(CELIX_MICRO "0")

💡 技术拓展:Apache Celix 与「OSGi」生态中的其他实现对比——

实现语言特点适用场景
Apache CelixC/C++原生 OSGi 规范实现,bundle 为共享库,内存占用小、启动快嵌入式、IoT、高性能 C/C++ 服务
原生 OSGi(Eclipse Equinox / Apache Felix)Java标准 OSGi 实现,bundle 为 JAR,生态成熟Java 服务模块化
自研插件框架(dlopen/dlsym 手写)C/C++无标准,按需加载共享库简单插件系统

本指南采用 Apache Celix,其以 CMake + gcc 构建、bundle 直接编译为共享库,是 C/C++ 生态中的 OSGi 标准实现。

3.2 本文选型

  • 主方案:GitHub 源码编译安装 Celix 3.0.0(第四至十一章均基于 3.0.0 实测回显)。
  • 备用方案:Apache 官方发布包安装 Celix 2.4.0(第六章)。
  • 两者均完整实测通过;生产环境如需稳定正式版,建议选 2.4.0;如需 3.x 新特性且可接受开发版,选源码编译 3.0.0。

四、在线源码编译安装方案(A:GitHub 源码,Celix 3.0.0)

本章从源码编译安装 Celix 3.0.0 到 /opt/celix,是本文的主方案,完整覆盖「获取源码 → CMake 配置 → 编译 → 安装 → 启动验证 → 最小 bundle 验证」全流程。

4.1 方案说明

源码编译是使用 Celix 3.x 的唯一途径(3.x 尚未发布官方 tar 包)。编译产物按 CMake 标准布局安装到指定前缀,便于与系统包隔离、多版本共存。

4.2 获取源码

使用 git clone 拉取 Apache Celix 仓库(master 分支即 3.0.0 开发版,浅克隆即可):

cd /opt
git clone --depth 1 https://github.com/apache/celix.git celix-src
cd celix-src
git log -1 --format="%H %ad %s"

实测回显:

Cloning into 'celix-src'...
0fff190972bf1b9bb0285469f3899fab1bb82b8e Mon Sep 28 11:49:10 2026 +0800 Add tests for handling invalid JSON replies and type mismatches in JSON serializer.

4.3 CMake 配置

创建构建目录并执行 CMake 配置,指定安装前缀 /opt/celix:

cd /opt/celix-src
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/opt/celix

实测回显(输出节选,实测首尾):

-- Found libzip: /usr/lib/x86_64-linux-gnu/libzip.so
-- Found jansson: /usr/lib/x86_64-linux-gnu/libjansson.so
-- Found libffi: /usr/lib/x86_64-linux-gnu/libffi.so
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.81.0")
-- Found libuuid: /usr/lib/x86_64-linux-gnu/libuuid.so
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.13")
-- Found RapidJSON: /usr/include/rapidjson
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/celix-src/build

⚠️ 注意:若配置时报 Could NOT find libuv (missing: LIBUV_LIBRARY LIBUV_INCLUDE_DIR),说明缺少 libuv1-dev,执行 apt-get install -y libuv1-dev 后删除 build 目录重新配置即可(本环境实测踩到该坑,详见十二章 FAQ)。

4.4 编译

使用 CMake 驱动底层 make 并行编译:

cd /opt/celix-src
cmake --build build -j4

实测回显(输出节选,实测首尾):

[100%] Building CXX object examples/celix-examples/readme_cxx_examples/CMakeFiles/ReadmeCxxExamplesContainer.dir/__/__/__/celix/gen/containers/ReadmeCxxExamplesContainer/main.cc.o
[100%] Built target FilterExampleContainer
[100%] Linking CXX executable ../../../deploy/ReadmeCxxExamplesContainer/ReadmeCxxExamplesContainer
[100%] Built target ReadmeCxxExamplesContainer
[100%] Built target celix-containers

验证编译产物(框架共享库与主程序):

ls /opt/celix-src/build/libs/framework/libcelix_framework.so*
find /opt/celix-src/build -maxdepth 3 -name "celix" -type f

实测回显:

/opt/celix-src/build/libs/framework/libcelix_framework.so
/opt/celix-src/build/libs/framework/libcelix_framework.so.3
/opt/celix-src/build/libs/framework/libcelix_framework.so.3.0.0
/opt/celix-src/build/libs/launcher/celix

4.5 安装

执行安装,产物落到 /opt/celix:

cd /opt/celix-src
cmake --install build

实测回显(输出节选,实测首尾):

-- Installing: /opt/celix/share/celix/cmake/Modules/FindDNSSD.cmake
-- Installing: /opt/celix/share/celix/cmake/Modules/Findczmq.cmake
-- Installing: /opt/celix/share/celix/cmake/cmake_celix/Generic.cmake
-- Installing: /opt/celix/share/celix/cmake/cmake_celix/UseCelix.cmake
-- Installing: /opt/celix/lib/cmake/Celix/CelixConfig.cmake
-- Installing: /opt/celix/lib/cmake/Celix/CelixConfigVersion.cmake

验证安装目录:

ls /opt/celix/bin/
ls /opt/celix/lib/ | grep -E "framework|utils"

实测回显:

celix
libcelix_framework.so
libcelix_framework.so.2
libcelix_framework.so.2.4.0
libcelix_framework.so.3
libcelix_framework.so.3.0.0
libcelix_utils.so
libcelix_utils.so.2
libcelix_utils.so.3

4.6 查看命令帮助

查看 celix 主程序用法,确认版本行为:

/opt/celix/bin/celix -h

实测回显:

Usage:
  celix [-h|-p|-c] [path/to/runtime/config.properties]
Options:
        -h | --help: Show this message.
        -p | --props: Show the embedded and runtime properties for this Celix runtime and exit.
        -c | --create-bundle-cache: Create the bundle cache for this Celix runtime and exit.

4.7 启动框架验证

直接启动 OSGi 运行时框架(不加载任何 bundle),确认框架可正常启停:

cd /tmp
timeout 6 /opt/celix/bin/celix

实测回显:

[2026-10-13T18:03:42] [   info] [celix_framework] [framework_start:496] Celix framework started
[2026-10-13T18:03:48] [   info] [celix_framework] Stopping Celix framework due to signal Terminated

输出说明:Celix framework started 表示框架启动成功;timeout 发送终止信号后框架优雅退出,说明生命周期管理正常。

4.8 最小 bundle 加载运行验证

本节编写一个最小 bundle(C 源码 + CMake 打包描述),编译为共享库并交由 celix 加载运行,验证框架能真正执行业务代码。

4.8.1 编写 bundle 源码

创建工程目录与 activator 源码(bundle 的入口相当于 OSGi 的 Bundle-Activator):

mkdir -p /opt/my-bundle/src

创建 /opt/my-bundle/src/bundle.c:

#include <stdio.h>
#include <celix_bundle_activator.h>

typedef struct activator_data {
    /*empty*/
} activator_data_t;

static celix_status_t activator_start(activator_data_t *data, celix_bundle_context_t *ctx) {
    printf("[my-bundle] activator_start: hello from my-bundle, bundle id=%li\n",
           celix_bundleContext_getBundleId(ctx));
    return CELIX_SUCCESS;
}

static celix_status_t activator_stop(activator_data_t *data, celix_bundle_context_t *ctx) {
    printf("[my-bundle] activator_stop: goodbye from my-bundle, bundle id=%li\n",
           celix_bundleContext_getBundleId(ctx));
    return CELIX_SUCCESS;
}

CELIX_GEN_BUNDLE_ACTIVATOR(activator_data_t, activator_start, activator_stop)

创建 /opt/my-bundle/CMakeLists.txt(bundle 打包描述):

cmake_minimum_required(VERSION 3.19)
project(my_bundle C)

find_package(Celix REQUIRED)

add_celix_bundle(my_bundle
    VERSION 1.0.0
    SOURCES src/bundle.c
)

说明:find_package(Celix) 找到上一步安装到 /opt/celix 的 Celix CMake 支持;add_celix_bundle 负责把源码编译成共享库并打包成标准 bundle 文件(zip,内含 MANIFEST.json 与 .so)。

4.8.2 编译 bundle

cd /opt/my-bundle
cmake -S . -B build -DCMAKE_PREFIX_PATH=/opt/celix
cmake --build build

实测回显(输出节选,实测首尾):

-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.13")
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/my-bundle/build
[ 25%] Building C object CMakeFiles/my_bundle.dir/src/bundle.c.o
[ 50%] Linking C shared library libmy_bundle.so
[ 75%] Generating celix/gen/bundles/my_bundle/lib-my_bundle-copy-timestamp
[100%] Packaging my_bundle
[100%] Built target my_bundle_bundle
[100%] Built target celix-bundles

验证打包产物与描述文件:

unzip -l /opt/my-bundle/build/my_bundle.zip
unzip -p /opt/my-bundle/build/my_bundle.zip META-INF/MANIFEST.json

实测回显:

Archive:  /opt/my-bundle/build/my_bundle.zip
  Length      Date    Time    Name
---------  ---------- ----    ----
        0  2026-10-13 18:04   META-INF/
      329  2026-10-13 18:04   META-INF/MANIFEST.json
    16208  2026-10-13 18:04   libmy_bundle.so.1
---------  -------
{
    "CELIX_BUNDLE_SYMBOLIC_NAME" : "my_bundle",
    "CELIX_BUNDLE_VERSION" : "version<1.0.0>",
    "CELIX_BUNDLE_NAME" : "my_bundle",
    "CELIX_BUNDLE_ACTIVATOR_LIBRARY": "libmy_bundle.so.1",
    "CELIX_BUNDLE_PRIVATE_LIBRARIES" : ["libmy_bundle.so.1"],
    "CELIX_BUNDLE_MANIFEST_VERSION" : "version<2.0.0>"
}

说明:bundle 文件是 zip 结构,MANIFEST.json 描述 bundle 符号名、版本、activator 库文件名,与 OSGi 规范的 MANIFEST.MF 对应。

4.8.3 编写运行时配置并加载

Celix 3.x 的运行时配置使用 JSON 格式文件,通过 CELIX_AUTO_START_0 指定启动级 0 自动安装并启动的 bundle:

cat > /opt/my-bundle/config.json <<'EOF'
{
  "CELIX_AUTO_START_0": "file:///opt/my-bundle/build/my_bundle.zip"
}
EOF
cd /opt/my-bundle
timeout 8 /opt/celix/bin/celix config.json

实测回显:

[my-bundle] activator_start: hello from my-bundle, bundle id=1
[2026-10-13T18:05:15] [   info] [celix_framework] [framework_start:496] Celix framework started
[2026-10-13T18:05:23] [   info] [celix_framework] Stopping Celix framework due to signal Terminated
[my-bundle] activator_stop: goodbye from my-bundle, bundle id=1

验证结论:activator_start 与 activator_stop 均在框架启动/停止时被调用,bundle id=1,说明最小 bundle 编译、打包、加载、生命周期回调全链路运行正常。

五、编译选项核对(cmake -L)

本节输出 Celix 3.0.0 配置后的真实 CMake 缓存选项,供读者核对默认值(配置参数详解篇亦有完整解读)。

cd /opt/celix-src
cmake -L -N build | grep -E "^(BUILD_|ENABLE_|CMAKE_BUILD_TYPE|CELIX_|CMAKE_INSTALL_PREFIX)" | sort

实测回显(输出节选,实测首尾):

BUILD_CELIX_DFI:BOOL=ON
BUILD_FRAMEWORK:BOOL=ON
BUILD_LAUNCHER:BOOL=ON
BUILD_SHELL:BOOL=ON
BUILD_SHELL_TUI:BOOL=ON
CELIX_ERR_BUFFER_SIZE:STRING=512
CELIX_USE_COMPRESSION_FOR_BUNDLE_ZIPS:BOOL=ON
CMAKE_BUILD_TYPE:STRING=
CMAKE_INSTALL_PREFIX:PATH=/opt/celix
ENABLE_APACHE_RAT:BOOL=OFF
ENABLE_CCACHE:BOOL=OFF
ENABLE_CODE_COVERAGE:BOOL=OFF
ENABLE_TESTING:BOOL=OFF

要点说明:CMAKE_BUILD_TYPE 默认为空(即无优化),生产环境建议显式指定 -DCMAKE_BUILD_TYPE=Release;ENABLE_TESTING 默认 OFF,需要跑单元测试时开启并安装 cpputest。

六、备用方案:官方发布包安装(B:Celix 2.4.0)

本章演示从 Apache 官方发布目录下载 2.4.0 正式版源码包,校验 SHA512 后编译安装到独立前缀 /opt/celix-2.4,与 3.0.0 共存互不影响。

6.1 方案说明

官方发布包路径固定、经过 Apache 发布流程签名,适合生产环境可追溯安装;缺点是版本停留在 2.4.0(3.x 尚未发布官方包)。

6.2 下载与校验

cd /opt
curl -sLO https://downloads.apache.org/celix/celix-2.4.0/celix-2.4.0.tar.gz
curl -sLO https://downloads.apache.org/celix/celix-2.4.0/celix-2.4.0.tar.gz.sha512
ls -la celix-2.4.0.tar.gz*

实测回显:

-rw-r--r-- 1 root root 2237654 Oct 13 18:19 celix-2.4.0.tar.gz
-rw-r--r-- 1 root root     204 Oct 13 18:19 celix-2.4.0.tar.gz.sha512

sha512 校验(Apache 的 sha512 文件为十六进制文本,需去除空格后与本地计算值比对):

cd /opt
SUM=$(sha512sum celix-2.4.0.tar.gz | awk '{print $1}')
EXPECT=$(tr -d ' \n' < celix-2.4.0.tar.gz.sha512 | sed 's/celix-2.4.0.tar.gz://' | tr 'A-F' 'a-f')
echo "expected: $EXPECT"
echo "actual:   $SUM"
[ "$EXPECT" = "$SUM" ] && echo "SHA512 MATCH OK" || echo "SHA512 MISMATCH"

实测回显:

expected: 76fb2ba448028894841e7315f62e864a0913144a528b666106b4946a0044b45af13629a558e627de4ea6331788bae482b63601aee669e44bbc32435cc0b72ff0
actual:   76fb2ba448028894841e7315f62e864a0913144a528b666106b4946a0044b45af13629a558e627de4ea6331788bae482b63601aee669e44bbc32435cc0b72ff0
SHA512 MATCH OK

6.3 编译安装

cd /opt
tar xzf celix-2.4.0.tar.gz
cd celix-2.4.0
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/opt/celix-2.4
cmake --build build -j4
cmake --install build

实测回显(输出节选,实测首尾):

-- Found RapidJSON: /usr/include/rapidjson
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/celix-2.4.0/build
[100%] Built target RemoteCalculatorConsumer
[100%] Built target ReadmeCxxExamplesContainer
[100%] Built target celix-containers
-- Installing: /opt/celix-2.4/lib/cmake/Celix/CelixConfig.cmake
-- Installing: /opt/celix-2.4/lib/cmake/Celix/CelixConfigVersion.cmake

6.4 验证

/opt/celix-2.4/bin/celix -h

实测回显:

Usage:
  celix [-h|-p] [path/to/runtime/config.properties]
Options:
        -h | --help: Show this message.
        -p | --props: Show the embedded and runtime properties for this Celix runtime and exit.
        -c | --create-bundle-cache: Create the bundle cache for this Celix runtime and exit.
        --embedded_bundles: Show the embedded bundles for this Celix runtime and exit.

差异说明:2.4.0 帮助比 3.0.0 多一个 --embedded_bundles 选项;两个版本主程序用法一致,均接受配置文件路径作为唯一位置参数。

七、方案对比与选择建议

对比维度方案 A:源码编译 3.0.0方案 B:官方包 2.4.0
版本3.0.0(开发版)2.4.0(正式版)
是否需要联网需要(github.com)需要(downloads.apache.org)
安装方式git clone + cmake下载 tar.gz + cmake
版本校验git commit 可追溯SHA512 官方校验
新特性3.x 全部新特性停留 2.4.0
稳定性开发版,接口可能变动正式发布,稳定
适合场景尝鲜 3.x、参与开发生产环境

选择建议:生产环境对稳定性要求高,选方案 B(2.4.0 官方包);需要 3.x 新特性或参与社区开发,选方案 A(源码 3.0.0);两者安装前缀独立,可同时共存按需切换。

八、多版本管理与升级降级

8.1 多版本共存

两个版本安装前缀分别为 /opt/celix(3.0.0)与 /opt/celix-2.4(2.4.0),互不覆盖,通过 PATH 或直接使用绝对路径切换:

# 使用 3.0.0
/opt/celix/bin/celix -h
# 使用 2.4.0
/opt/celix-2.4/bin/celix -h

8.2 升级与降级

升级:重新拉取 master 源码(git pull 或重新 clone)后 cmake --build build && cmake --install build;降级:重新编译安装目标版本到独立前缀即可。版本切换前建议备份配置文件与 bundle 目录:

cp -r /opt/celix /opt/celix-backup-$(date +%Y%m%d)

九、卸载与清理

9.1 卸载安装目录

rm -rf /opt/celix
rm -rf /opt/celix-2.4

9.2 清理源码与构建目录

rm -rf /opt/celix-src /opt/celix-2.4.0 /opt/my-bundle

9.3 清理运行期文件

框架默认在运行目录生成 .cache 目录(bundle 缓存),按需清理:

rm -rf /tmp/.cache /root/.cache/bundle*

验证清理结果:

ls /opt/celix 2>&1; ls /opt/celix-src 2>&1

实测回显:

ls: cannot access '/opt/celix': No such file or directory
ls: cannot access '/opt/celix-src': No such file or directory

十、常见问题(FAQ)

Q1:CMake 配置报 Could NOT find libuv 如何处理?

实测报错:

CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find libuv (missing: LIBUV_LIBRARY LIBUV_INCLUDE_DIR)

定位:libuv 是 libs/utils 的必需依赖,Ubuntu 22.04 中包名为 libuv1-dev。解决:

apt-get install -y libuv1-dev
cd /opt/celix-src && rm -rf build && cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/opt/celix

重新配置后 -- Configuring done 即恢复。

Q2:celix 命令不识别 --version 参数?

实测回显:

Error creating runtime properties: Failed to open file --version.

说明:celix 主程序不支持 --version,会把未知参数当作配置文件路径。版本信息通过构建产物(libcelix_framework.so.3.0.0)与 CMakeLists.txt 中的 CELIX_MAJOR/MINOR/MICRO 确认。

Q3:运行时配置文件写成 key=value 风格报 JSON 解析错误?

实测报错:

Error creating runtime properties: Failed to parse json from <stream>:1:1: '[' or '{' expected near '#'.

说明:Celix 3.x 的运行时配置统一使用 JSON 格式(celix_properties_load 只支持 JSON 解码),必须按第四章 4.8.3 的 { "key": "value" } 形式书写。

Q4:编译速度慢或内存不足如何优化?

使用 -j 控制并行度并按需裁剪组件。实测本机 4 核 -j4 全量构建约 3 分钟;可关闭示例与不用的远程服务组件加速:

cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/opt/celix -DBUILD_EXAMPLES=OFF -DBUILD_RSA_DISCOVERY_ETCD=OFF

Q5:如何确认当前框架版本号?

ls /opt/celix/lib/ | grep framework

实测回显:

libcelix_framework.so.3
libcelix_framework.so.3.0.0

其中 3.0.0 即框架版本。

十一、参考链接

  1. Apache Celix 官网:https://celix.apache.org/
  2. Apache Celix 源码仓库:https://github.com/apache/celix
  3. Apache 官方发布目录:https://downloads.apache.org/celix/
  4. Celix 2.4.0 源码包:https://downloads.apache.org/celix/celix-2.4.0/celix-2.4.0.tar.gz
  5. OSGi 规范官网:https://www.osgi.org/