[Qgis-developer] Build compile error

Martin Dobias wonder.sk at gmail.com
Tue Jan 22 20:32:34 EST 2008


2008/1/22 volkan kepoglu <vkepoglu at gmail.com>:
> > if you've installed qgis to /usr/local prefix, you actually don't need
> > to set LD_LIBRARY_PATH since /usr/local/lib (where are the files
> > libqgis_core.so and libqgis_gui.so) is already in linker's search
> > path. Just make sure to call ldconfig after installing to update the
> > cache of system libraries.
>
>
> my install is /usr/local, it is required to set every time to write "export
> LD_LIBRARY_PATH=/usr/local/lib" in terminal.
> is there way to make this definition permanently?

To explain this a bit: normally dynamic linker uses its cache to find
needed shared objects (*.so files). There's usually a file called
/etc/ld.so.conf where is a list of directories. This config file is
used by 'ldconfig' tool which recreates the cache of libraries. It's
usual that /usr/local/lib directory is included, so you just need to
re-create the cache after installing new programs to /usr/local prefix
- so that dynamic linker can find it.
In case you would like to use some special directory to search for
libraries (in addition to the cache), use LD_LIBRARY_PATH variable to
specify it.
So in your case you don't have to specify LD_LIBRARY_PATH everytime,
just reload the cache once after installing QGIS and that's it.


> > when you do 'export' it will be working only in current shell. So you
> > have to do first export of PYTHONPATH variable and then in the same
> > console open python interpreter. Or you can do the same in Python -
> > before importing qgis modules you can add that path to python's
> > sys.path array.
>
>
> How can I add "PYTHONPATH=/usr/local/share/qgis/python" to python's sys.path
> array.

for example:

import sys
sys.path.insert(0, '/usr/local/share/qgis/python')


Martin



More information about the Qgis-developer mailing list