After installation of LibreDWG, Sometimes happens like we are unable to import python module. It gives following error :-
Type "help", "copyright", "credits" or "license" for more information. >>> import libredwg Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/libredwg.py", line 26, in <module> _libredwg = swig_import_helper() File "/usr/local/lib/python2.7/dist-packages/libredwg.py", line 22, in swig_import_helper _mod = imp.load_module('_libredwg', fp, pathname, description) ImportError: libredwg.so.0: cannot open shared object file: No such file or directory
And if we try to compile examples, at runtime those give error as :-
gcc -g -o testSVG testSVG.c -lredwg -lm It gets compiled but when I run it, also gives error as ./testSVG: error while loading shared libraries: libredwg.so.0: cannot open shared object file: No such file or directory
This is basically due to library path problem.
To solve this problem, Open terminal and issue following commands :-
$ ldconfig
this will solve the error.