Yet another error I encounter whilst running DBT2 tests. This time it was a problem with generating the final reports.

They are generated using a Python library which uses R under the hood. This is the error.

Traceback (most recent call last):
  File "/usr/local/bin/dbt2-post-process", line 14, in
    import rpy2.robjects as robjects
  File "/usr/local/lib64/python2.7/site-packages/rpy2/robjects/", line 15, in
    import rpy2.rinterface as rinterface
  File "/usr/local/lib64/python2.7/site-packages/rpy2/rinterface/", line 101, in
    from rpy2.rinterface._rinterface import *
ImportError: cannot open shared object file: No such file or directory

To resolve this first locate

find /usr -name

Then add this to your LD_LIBRARY_PATH variable.

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib64/R/lib