<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>&nbsp;</div>
<div>/usr/local/lib definition&nbsp;exits in /etc/ld.so.conf.d/libc.conf</div>
<div>&nbsp;</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&nbsp;way is to use qgis bindings in python as follows;</div>
<div>&nbsp;</div>
<div><a href="mailto:vkepoglu@vkepoglu:~$">vkepoglu@vkepoglu:~$</a> python<br>Python 2.5.1 (r251:54863, Oct&nbsp; 5 2007, 13:36:32) <br>[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2<br>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
<br>&gt;&gt;&gt; from qgis.core import *<br>Traceback (most recent call last):<br>&nbsp; File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<br>ImportError: No module named qgis.core<br>&gt;&gt;&gt; import sys<br>&gt;&gt;&gt; print 
sys.path<br>[&#39;&#39;, &#39;/usr/lib/python25.zip&#39;, &#39;/usr/lib/python2.5&#39;, &#39;/usr/lib/python2.5/plat-linux2&#39;, &#39;/usr/lib/python2.5/lib-tk&#39;, &#39;/usr/lib/python2.5/lib-dynload&#39;, &#39;/usr/local/lib/python2.5/site-packages&#39;, &#39;/usr/lib/python2.5/site-packages&#39;, &#39;/usr/lib/python2.5/site-packages/Numeric&#39;, &#39;/usr/lib/python2.5/site-packages/gst-
0.10&#39;, &#39;/var/lib/python-support/python2.5&#39;, &#39;/usr/lib/python2.5/site-packages/gtk-2.0&#39;, &#39;/var/lib/python-support/python2.5/gtk-2.0&#39;, &#39;/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode&#39;]
<br>&gt;&gt;&gt; sys.path.insert (0, &#39;/usr/local/share/qgis/python&#39;)<br>&gt;&gt;&gt; from qgis.core import *<br>Traceback (most recent call last):<br>&nbsp; File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<br>
ImportError: libqgis_core.so: cannot open shared object file: No such file or directory<br>&gt;&gt;&gt; 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&nbsp; 5 2007, 13:36:32) <br>[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2<br>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
<br>&gt;&gt;&gt; from qgis.core import *<br>Traceback (most recent call last):<br>&nbsp; File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<br>ImportError: No module named qgis.core<br>&gt;&gt;&gt; import sys<br>&gt;&gt;&gt; 
sys.path.insert (0, &#39;/usr/local/share/qgis/python&#39;)<br>&gt;&gt;&gt; print sys.path<br>[&#39;/usr/local/share/qgis/python&#39;, &#39;&#39;, &#39;/usr/lib/python25.zip&#39;, &#39;/usr/lib/python2.5&#39;, &#39;/usr/lib/python2.5/plat-linux2&#39;, &#39;/usr/lib/python2.5/lib-tk&#39;, &#39;/usr/lib/python2.5/lib-dynload&#39;, &#39;/usr/local/lib/python2.5/site-packages&#39;, &#39;/usr/lib/python2.5/site-packages&#39;, &#39;/usr/lib/python2.5/site-packages/Numeric&#39;, &#39;/usr/lib/python2.5/site-packages/gst-
0.10&#39;, &#39;/var/lib/python-support/python2.5&#39;, &#39;/usr/lib/python2.5/site-packages/gtk-2.0&#39;, &#39;/var/lib/python-support/python2.5/gtk-2.0&#39;, &#39;/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode&#39;]
<br>&gt;&gt;&gt; from qgis.core import *<br>&gt;&gt;&gt; <br>&gt;&gt;&gt; </div>
<div>&nbsp;</div>
<div>&quot;/etc/ld.so.conf&quot; inside of file has following;</div>
<div>&nbsp;</div>
<div>include /etc/ld.so.conf.d/*.conf</div>
<div>/usr/lib/atlas</div>
<div>&nbsp;</div>
<div>in &quot;/etc/ld.so.conf.d&quot; folder there&nbsp;are three files; i486-linux-gun, libc.conf, libR.conf</div>
<div>&nbsp;</div>
<div>libc.conf file has the following;<br>&nbsp;</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> &lt;<a href="mailto:wonder.sk@gmail.com">wonder.sk@gmail.com</a>&gt; 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 &lt;<a href="mailto:vkepoglu@gmail.com">vkepoglu@gmail.com</a>&gt;:<br>&gt; &gt; if you&#39;ve installed qgis to /usr/local prefix, you actually don&#39;t need
<br>&gt; &gt; to set LD_LIBRARY_PATH since /usr/local/lib (where are the files<br>&gt; &gt; libqgis_core.so and libqgis_gui.so) is already in linker&#39;s search<br>&gt; &gt; path. Just make sure to call ldconfig after installing to update the
<br>&gt; &gt; cache of system libraries.<br>&gt;<br>&gt;<br>&gt; my install is /usr/local, it is required to set every time to write &quot;export<br>&gt; LD_LIBRARY_PATH=/usr/local/lib&quot; in terminal.<br>&gt; 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&#39;s usually a file called<br>/etc/ld.so.conf where is a list of directories. This config file is
<br>used by &#39;ldconfig&#39; tool which recreates the cache of libraries. It&#39;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&#39;t have to specify LD_LIBRARY_PATH everytime,
<br>just reload the cache once after installing QGIS and that&#39;s it.<br><br><br>&gt; &gt; when you do &#39;export&#39; it will be working only in current shell. So you<br>&gt; &gt; have to do first export of PYTHONPATH variable and then in the same
<br>&gt; &gt; console open python interpreter. Or you can do the same in Python -<br>&gt; &gt; before importing qgis modules you can add that path to python&#39;s<br>&gt; &gt; sys.path array.<br>&gt;<br>&gt;<br>&gt; How can I add &quot;PYTHONPATH=/usr/local/share/qgis/python&quot; to python&#39;s 
sys.path<br>&gt; array.<br><br>for example:<br><br>import sys<br>sys.path.insert(0, &#39;/usr/local/share/qgis/python&#39;)<br><br><br>Martin<br></blockquote></div><br>