Hi Carson, I had a similar problem but launching qgis (I still have to start it by using a script) and solved it by doing:

LIBUTIL=$(locate -r libutil.so$)
LD_PRELOAD=$LIBUTIL #use locate libutil to find the path
export LD_PRELOAD

maybe it helps (was suggested in this list a while ago).

BTW anybody has an idea why this would happen?

ciao
Marco

On 06/16/2011 01:54 PM, Carson Farmer wrote:
I'd like to 'second' this observation. No matter what combination of
PYTHONPATH, LD_LIBRARY_PATH etc I try, I can't seem to get this
working either. I'm forwarding this thread to the developers mailing
list as well. Any suggestions? I've never had this problem before,
though I'm sure its something I'm doing :-p

Carson

#####################################################

Hello,

I know this problem has been discussed many times, but the usual
remedies are not working.

First I run the following commands from the shell:

export LD_LIBRARY_PATH=/usr/local/qgis/lib
export PYTHONPATH=/usr/local/qgis/share/qgis/python


Then I run the following program:

from qgis.core import *

qgis_prefix = '/usr/local/qgis/'

QgsApplication.setPrefixPath('/usr/local/qgis/', True)
QgsApplication.initQgis()

vlayer=QgsVectorLayer('./tl_2009_09001_faces.shp','tl_2009_09001_faces','ogr')
print vlayer.isValid()


I get the error message "Failed to load".

I am using the 1.18 debian packages.  It works fine if I run these
commands from the python console in qgis.  Any suggestions?  Thanks.
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to