环境
yum -y install perl-Data-Dumper
yum -y install perl-IPC-Cmd
yum -y install boost-devel
yum -y install zlib-devel
yum -y install libxml2-devel
yum -y install wxGTK3
yum -y install cairo-devel
编译
安装包准备
mkdir -p /opt/app
cd /opt/app
wget https://github.com/openbabel/openbabel/archive/refs/tags/openbabel-3-1-1.tar.gz
wget https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz
wget https://github.com/Kitware/CMake/releases/download/v3.30.3/cmake-3.30.3.tar.gz
wget https://github.com/openssl/openssl/archive/refs/tags/openssl-3.3.1.tar.gz
编译
## openssl
cd /opt/app
tar zxvf openssl-3.3.1.tar.gz
cd openssl-openssl-3.3.1/
./Configure --prefix=/opt/app/openssl/3.3.1
make -j2
make install
export PATH=/opt/app/openssl/3.3.1/bin:$PATH
export LD_LIBRARY_PATH=/opt/app/openssl/3.3.1/lib64:$LD_LIBRARY_PATH
export LIBRARY_PATH=/opt/app/openssl/3.3.1/lib64:$LIBRARY_PATH
export OPENSSL_ROOT_DIR=/opt/app/openssl/3.3.1
## cmake
cd /opt/app
tar zxvf cmake-3.30.3.tar.gz
cd cmake-3.30.3/
./configure --prefix=/opt/app/cmake/3.30.3
make -j4
make install
export PATH=/opt/app/cmake/3.30.3/bin:$PATH
## eigen
cd /opt/app
tar zxvf eigen-3.4.0.tar.gz
## openbabel
tar zxvf openbabel-3-1-1.tar.gz
cd openbabel-openbabel-3-1-1/
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/opt/app/openbabel/3.1.1 -DEIGEN3_INCLUDE_DIR=/opt/app/eigen-3.4.0 ..
make -j4
make test
make install
加载环境
export PATH=/opt/app/openbabel/3.1.1/bin:$PATH
export LD_LIBRARY_PATH=/opt/app/openbabel/3.1.1/lib:$LD_LIBRARY_PATH
export LIBRARY_PATH=/opt/app/openbabel/3.1.1/lib:$LIBRARY_PATH
obabel --help