<div>I am using Ubuntu in Windows with emulator, VMware workstation 5.5.5</div>
<div>I am new baby in linux, sorry for this. </div>
<div> </div>
<div>/usr/local/lib definition exits in /etc/ld.so.conf.d/libc.conf</div>
<div> </div>
<div>maybe the problem is related with python, ý do not know, or with emulator.</div>
<div>or maybe it is not a problem. my way is to use qgis bindings in python as follows;</div>
<div> </div>
<div><a href="mailto:vkepoglu@vkepoglu:~$">vkepoglu@vkepoglu:~$</a> python<br>Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32) <br>[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2<br>Type "help", "copyright", "credits" or "license" for more information.
<br>>>> from qgis.core import *<br>Traceback (most recent call last):<br> File "<stdin>", line 1, in <module><br>ImportError: No module named qgis.core<br>>>> import sys<br>>>> print
sys.path<br>['', '/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']
<br>>>> sys.path.insert (0, '/usr/local/share/qgis/python')<br>>>> from qgis.core import *<br>Traceback (most recent call last):<br> File "<stdin>", line 1, in <module><br>
ImportError: libqgis_core.so: cannot open shared object file: No such file or directory<br>>>> quit()<br><a href="mailto:vkepoglu@vkepoglu:~$">vkepoglu@vkepoglu:~$</a> export LD_LIBRARY_PATH=/usr/local/lib<br><a href="mailto:vkepoglu@vkepoglu:~$">
vkepoglu@vkepoglu:~$</a> python<br>Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32) <br>[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2<br>Type "help", "copyright", "credits" or "license" for more information.
<br>>>> from qgis.core import *<br>Traceback (most recent call last):<br> File "<stdin>", line 1, in <module><br>ImportError: No module named qgis.core<br>>>> import sys<br>>>>
sys.path.insert (0, '/usr/local/share/qgis/python')<br>>>> print sys.path<br>['/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']
<br>>>> from qgis.core import *<br>>>> <br>>>> </div>
<div> </div>
<div>"/etc/ld.so.conf" inside of file has following;</div>
<div> </div>
<div>include /etc/ld.so.conf.d/*.conf</div>
<div>/usr/lib/atlas</div>
<div> </div>
<div>in "/etc/ld.so.conf.d" folder there are three files; i486-linux-gun, libc.conf, libR.conf</div>
<div> </div>
<div>libc.conf file has the following;<br> </div># libc default configuration<br>/usr/local/lib<br><br>
<div><span class="gmail_quote">On 1/23/08, <b class="gmail_sendername">Martin Dobias</b> <<a href="mailto:wonder.sk@gmail.com">wonder.sk@gmail.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">2008/1/22 volkan kepoglu <<a href="mailto:vkepoglu@gmail.com">vkepoglu@gmail.com</a>>:<br>> > if you've installed qgis to /usr/local prefix, you actually don't need
<br>> > to set LD_LIBRARY_PATH since /usr/local/lib (where are the files<br>> > libqgis_core.so and libqgis_gui.so) is already in linker's search<br>> > path. Just make sure to call ldconfig after installing to update the
<br>> > cache of system libraries.<br>><br>><br>> my install is /usr/local, it is required to set every time to write "export<br>> LD_LIBRARY_PATH=/usr/local/lib" in terminal.<br>> is there way to make this definition permanently?
<br><br>To explain this a bit: normally dynamic linker uses its cache to find<br>needed shared objects (*.so files). There's usually a file called<br>/etc/ld.so.conf where is a list of directories. This config file is
<br>used by 'ldconfig' tool which recreates the cache of libraries. It's<br>usual that /usr/local/lib directory is included, so you just need to<br>re-create the cache after installing new programs to /usr/local prefix
<br>- so that dynamic linker can find it.<br>In case you would like to use some special directory to search for<br>libraries (in addition to the cache), use LD_LIBRARY_PATH variable to<br>specify it.<br>So in your case you don't have to specify LD_LIBRARY_PATH everytime,
<br>just reload the cache once after installing QGIS and that's it.<br><br><br>> > when you do 'export' it will be working only in current shell. So you<br>> > have to do first export of PYTHONPATH variable and then in the same
<br>> > console open python interpreter. Or you can do the same in Python -<br>> > before importing qgis modules you can add that path to python's<br>> > sys.path array.<br>><br>><br>> How can I add "PYTHONPATH=/usr/local/share/qgis/python" to python's
sys.path<br>> array.<br><br>for example:<br><br>import sys<br>sys.path.insert(0, '/usr/local/share/qgis/python')<br><br><br>Martin<br></blockquote></div><br>