Error while installing FEniCS from source


I am trying to install FeniCS from source (following this link

When I do:

from dolfin import *

I get the following error:

Traceback (most recent call last):
File “”, line 1, in
File “~/Builds/lib/python3.7/site-packages/dolfin/”, line 34, in
from .cpp import version
ImportError: ~/Builds/lib64/ undefined symbol: _ZNK5boost15program_options22error_with_option_name23substitute_placeholdersERKSs

Then I did (following this link

echo _ZNK5boost15program_options22error_with_option_name23substitute_placeholdersERKSs|c++filt

which produces the following error:

boost::program_options::error_with_option_name::substitute_placeholders(std::basic_string<char, std::char_traits, std::allocator > const&) const

The file is in ~/Builds/lib.

I have installed boost_1.75.0.