[Qgis-developer] Build compile error
volkan kepoglu
vkepoglu at gmail.com
Wed Jan 23 04:26:45 EST 2008
I am using Ubuntu in Windows with emulator, VMware workstation 5.5.5
I am new baby in linux, sorry for this.
/usr/local/lib definition exits in /etc/ld.so.conf.d/libc.conf
maybe the problem is related with python, ı do not know, or with emulator.
or maybe it is not a problem. my way is to use qgis bindings in python as
follows;
vkepoglu at vkepoglu:~$ python
Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from qgis.core import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named qgis.core
>>> import sys
>>> print sys.path
['', '/usr/lib/python25.zip', '/usr/lib/python2.5',
'/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk',
'/usr/lib/python2.5/lib-dynload', '/usr/local/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages/Numeric',
'/usr/lib/python2.5/site-packages/gst-0.10',
'/var/lib/python-support/python2.5', '/usr/lib/python2.5/site-packages/gtk-
2.0', '/var/lib/python-support/python2.5/gtk-2.0',
'/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode']
>>> sys.path.insert (0, '/usr/local/share/qgis/python')
>>> from qgis.core import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: libqgis_core.so: cannot open shared object file: No such file
or directory
>>> quit()
vkepoglu at vkepoglu:~$ export LD_LIBRARY_PATH=/usr/local/lib
vkepoglu at vkepoglu:~$ python
Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from qgis.core import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named qgis.core
>>> import sys
>>> sys.path.insert (0, '/usr/local/share/qgis/python')
>>> print sys.path
['/usr/local/share/qgis/python', '', '/usr/lib/python25.zip',
'/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2',
'/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload',
'/usr/local/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages/Numeric',
'/usr/lib/python2.5/site-packages/gst-0.10',
'/var/lib/python-support/python2.5', '/usr/lib/python2.5/site-packages/gtk-
2.0', '/var/lib/python-support/python2.5/gtk-2.0',
'/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode']
>>> from qgis.core import *
>>>
>>>
"/etc/ld.so.conf" inside of file has following;
include /etc/ld.so.conf.d/*.conf
/usr/lib/atlas
in "/etc/ld.so.conf.d" folder there are three files; i486-linux-gun,
libc.conf, libR.conf
libc.conf file has the following;
# libc default configuration
/usr/local/lib
On 1/23/08, Martin Dobias <wonder.sk at gmail.com> wrote:
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20080123/4a01d0a7/attachment.html
More information about the Qgis-developer
mailing list