log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using N

本文详细介绍了如何解决使用Log4j1.2.15版本时遇到的bug问题,通过更换至Log4j1.2.14版本成功解决问题的过程。此解决方案适用于所有面临相同bug的开发者。
 Log4j 1.2.15存在一个bug会导致log4j:ERROR LogMananger.repositorySelector was null likely due to 
于是我换成了Log4j 1.2.14版本,问题解决了! 
### 解决方案 在构建 Ceres 时遇到 `CMake Error at cmake_install.cmake:46 (message): Cannot generate CeresConfig.cmake due to missing Abseil version` 的错误,通常是因为未正确配置或安装 Abseil 库。以下是详细的解决方案: #### 1. 安装 Abseil Abseil 是 Google 提供的一个开源库集合,用于支持各种项目开发。如果尚未安装 Abseil,则需要先完成其安装。 可以通过以下命令克隆并构建 Abseil: ```bash git clone https://github.com/abseil/abseil-cpp.git cd abseil-cpp mkdir build && cd build cmake .. make -j$(nproc) sudo make install ``` 这一步完成后,确保 Abseil 已被成功安装到系统的默认路径下[^1]。 #### 2. 配置 Abseil 版本号 即使已安装 Abseil,仍可能因版本检测失败而触发此错误。此时可以手动设置 Abseil 的版本号以绕过该检查。通过修改 CMake 参数实现这一点: ```bash cmake .. -Dabsl_VERSION=20211101.0 ``` 其中 `-Dabsl_VERSION=20211101.0` 表示指定 Abseil 的具体版本号。可以根据实际使用的 Abseil 版本来调整这个值[^3]。 #### 3. 构建 Ceres Solver 当 Abseil 被正确配置后,继续按照标准流程重新构建 Ceres Solver: ```bash mkdir build && cd build cmake .. make -j$(nproc) sudo make install ``` 注意,在运行 `cmake` 命令前确认环境变量中包含了 Abseil 的头文件和链接器路径。例如: ```bash export CMAKE_PREFIX_PATH=/usr/local/lib/cmake/absl:$CMAKE_PREFIX_PATH ``` #### 4. 检查依赖项 除了 Abseil 外,还需要验证其他必要的依赖项是否齐全,比如 Eigen 和 glog。如果没有安装这些组件,也可能引发类似的错误消息。建议逐一排查缺失的依赖关系,并按需安装它们[^4]。 --- ### 示例代码片段 以下是一个完整的脚本样例,展示如何自动化处理上述过程: ```bash #!/bin/bash # Step 1: Install Abseil if [ ! -d "abseil-cpp" ]; then git clone https://github.com/abseil/abseil-cpp.git fi cd abseil-cpp || exit mkdir -p build && cd build || exit cmake .. make -j$(nproc) sudo make install # Step 2: Configure and Build Ceres Solver cd ../../ceres-solver || exit mkdir -p build && cd build || exit cmake .. -Dabsl_VERSION=20211101.0 make -j$(nproc) sudo make install ``` --- ###
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值