-2

How do I Install openbabel (3.1.1) in ubuntu using github repository?

General Grievance
  • 4,555
  • 31
  • 31
  • 45

1 Answers1

2

To install Open Babel 3.1.1 in Ubuntu 20.04, you can follow these steps:

  1. Open a terminal window by pressing Ctrl+Alt+T on your keyboard.

  2. Update the package index by running the following command:

    sudo apt update
    
  3. Install the necessary dependencies by running the following command:

    sudo apt install build-essential cmake git libcairo2-dev libeigen3-dev libffi-dev libfreetype6-dev libpng-dev libpython3-dev libxml2-dev python3 python3-dev python3-pip python3-pyqt5 python3-pyqt5.qtsvg python3-setuptools qtbase5-dev zlib1g-dev
    
  4. Clone the Open Babel source code from GitHub by running the following command:

    git clone https://github.com/openbabel/openbabel.git
    
  5. Navigate to the Open Babel source code directory by running the following command:

    cd openbabel
    
  6. Checkout the version 3.1.1 release tag by running the following command:

    git checkout tags/openbabel-3-1-1
    
  7. Create a build directory by running the following command:

    mkdir build
    
  8. Navigate to the build directory by running the following command:

    cd build
    
  9. Configure the build by running the following command:

    cmake ..
    
  10. Compile the source code by running the following command:

    make

  11. Install Open Babel by running the following command:

    sudo make install

After these steps, Open Babel 3.1.1 should be installed on your Ubuntu 20.04 system. You can verify the installation by running the following command:

obabel --version

You can delete the Open Babel source code folder after installing Open Babel on Ubuntu 20.04. Once you have successfully installed Open Babel using the steps provided, the installation files will have been copied to the appropriate system directories, and the source code files are no longer needed.

You can delete the Open Babel source code folder by running the following command from the terminal:

rm -rf openbabel