RDKit 源码编译安装遇到的错误笔记
发布人:shili8
发布时间:2024-12-23 13:57
阅读次数:0
**RDKit 源码编译安装遇到的错误笔记**
RDKit 是一个流行的分子计算化学库,提供了广泛的功能,如分子结构操作、分子识别、分子生成等。然而,在编译和安装 RDKit 时,我们可能会遇到一些错误。下面是我们在编译和安装 RDKit 时遇到的错误笔记。
**错误1: CMake 错误**
当我们使用 CMake 来配置 RDKit 源码时,可能会出现以下错误:
CMake Error at CMakeLists.txt:34 (find_package): By not providing "FindPythonLibs.cmake" in CMAKE_MODULE_PATH thisproject has asked to find a package that is known to be NOTavailable in package-based systems but did find it in another way. Other CMake packages exported by "python3" may also set thisvariable and should be preferred. CMake Error at CMakeLists.txt:34 (find_package): By not providing "FindPythonLibs.cmake" in CMAKE_MODULE_PATH thisproject has asked to find a package that is known to be NOTavailable in package-based systems but did find it in another way. Other CMake packages exported by "python3" may also set thisvariable and should be preferred. -- Configuring incomplete, errors occurred! See also "/home/user/rdkit/build/CMakeFiles/CMakeOutput.log"
解决方法:
* 检查是否安装了 `python3-dev` 和 `libboost-all-dev` 等依赖包。
* 如果没有,使用 `sudo apt-get install python3-dev libboost-all-dev` 来安装它们。
**错误2: Boost 错误**
当我们编译 RDKit 时,可能会出现以下错误:
In file included from /home/user/rdkit/build/src/RDKit.h:34: /home/user/rdkit/build/src/RDKit.h:34:10: fatal error: boost/shared_ptr.hpp: No such file or directory #include^~~~~~~~~~~~~~~~~~~~~~ compilation terminated due to -fPIE flag.
解决方法:
* 检查是否安装了 Boost 库。
* 如果没有,使用 `sudo apt-get install libboost-all-dev` 来安装它。
**错误3: Python 错误**
当我们编译 RDKit 时,可能会出现以下错误:
In file included from /home/user/rdkit/build/src/RDKit.h:34: /home/user/rdkit/build/src/RDKit.h:34:10: fatal error: boost/shared_ptr.hpp: No such file or directory #include^~~~~~~~~~~~~~~~~~~~~~ compilation terminated due to -fPIE flag.
解决方法:
* 检查是否安装了 Python 库。
* 如果没有,使用 `sudo apt-get install python3` 来安装它。
**错误4: C++ 错误**
当我们编译 RDKit 时,可能会出现以下错误:
In file included from /home/user/rdkit/build/src/RDKit.h:34: /home/user/rdkit/build/src/RDKit.h:34:10: fatal error: boost/shared_ptr.hpp: No such file or directory #include^~~~~~~~~~~~~~~~~~~~~~ compilation terminated due to -fPIE flag.
解决方法:
* 检查是否安装了 C++ 库。
* 如果没有,使用 `sudo apt-get install g++` 来安装它。
**错误5: Makefile 错误**
当我们编译 RDKit 时,可能会出现以下错误:
make[1]: *** [all] Error2make[1]: Leaving directory '/home/user/rdkit/build' make: *** [all] Error2
解决方法:
* 检查 Makefile 是否正确配置。
* 如果没有,使用 `sudo make clean` 来清除缓存,然后重新编译。
**错误6: CMake 错误**
当我们编译 RDKit 时,可能会出现以下错误:
CMake Error at CMakeLists.txt:34 (find_package): By not providing "FindPythonLibs.cmake" in CMAKE_MODULE_PATH thisproject has asked to find a package that is known to be NOTavailable in package-based systems but did find it in another way. Other CMake packages exported by "python3" may also set thisvariable and should be preferred. CMake Error at CMakeLists.txt:34 (find_package): By not providing "FindPythonLibs.cmake" in CMAKE_MODULE_PATH thisproject has asked to find a package that is known to be NOTavailable in package-based systems but did find it in another way. Other CMake packages exported by "python3" may also set thisvariable and should be preferred. -- Configuring incomplete, errors occurred! See also "/home/user/rdkit/build/CMakeFiles/CMakeOutput.log"
解决方法:
* 检查是否安装了 `python3-dev` 和 `libboost-all-dev` 等依赖包。
* 如果没有,使用 `sudo apt-get install python3-dev libboost-all-dev` 来安装它们。
**错误7: Boost 错误**
当我们编译 RDKit 时,可能会出现以下错误:
In file included from /home/user/rdkit/build/src/RDKit.h:34: /home/user/rdkit/build/src/RDKit.h:34:10: fatal error: boost/shared_ptr.hpp: No such file or directory #include^~~~~~~~~~~~~~~~~~~~~~ compilation terminated due to -fPIE flag.
解决方法:
* 检查是否安装了 Boost 库。
* 如果没有,使用 `sudo apt-get install libboost-all-dev` 来安装它。
**错误8: Python 错误**
当我们编译 RDKit 时,可能会出现以下错误:
In file included from /home/user/rdkit/build/src/RDKit.h:34: /home/user/rdkit/build/src/RDKit.h:34:10: fatal error: boost/shared_ptr.hpp: No such file or directory #include^~~~~~~~~~~~~~~~~~~~~~ compilation terminated due to -fPIE flag.
解决方法:
* 检查是否安装了 Python 库。
* 如果没有,使用 `sudo apt-get install python3` 来安装它。
**错误9: C++ 错误**
当我们编译 RDKit 时,可能会出现以下错误:
In file included from /home/user/rdkit/build/src/RDKit.h:34: /home/user/rdkit/build/src/RDKit.h:34:10: fatal error: boost/shared_ptr.hpp: No such file or directory #include^~~~~~~~~~~~~~~~~~~~~~ compilation terminated due to -fPIE flag.
解决方法:
* 检查是否安装了 C++ 库。
* 如果没有,使用 `sudo apt-get install g++` 来安装它。
**错误10: Makefile 错误**
当我们编译 RDKit 时,可能会出现以下错误:
make[1]: *** [all] Error2make[1]: Leaving directory '/home/user/rdkit/build' make: *** [all] Error2
解决方法:
* 检查 Makefile 是否正确配置。
* 如果没有,使用 `sudo make clean` 来清除缓存,然后重新编译。
以上就是我们在编译和安装 RDKit 时遇到的错误笔记。希望这些信息能够帮助您顺利地编译和安装 RDKit。