cant be able to setup GDAL in django prject

250 views
Skip to first unread message

Puneet Makhija

unread,
Jun 15, 2020, 9:21:51 AM6/15/20
to Django users
As i am Stuck in this Error from 2 days. But cant get the Solution why this was Happening
I am getting an Error:
    
self._handle = _dlopen(self._name, mode)
   indusli  
| OSError: /usr/local/lib/libgdal.so: cannot open shared object file: No such file or directory

And below is my django settings.py file    library path for GDAL and GEOS   

GDAL_LIBRARY_PATH="/usr/local/lib/libgdal.so"
GEOS_LIBRARY_PATH
="/usr/local/lib/libgeos_c.so"


As i setted up the path in the /etc/ld.so.conf :-
include /etc/ld.so.conf.d/*.conf
/usr/local/lib
then sudo ldconfig

still im geeting the same error :-

cannot open shared object file: No such file or directory
As i stuck in this from last 2 days why this was happening

As i am using Ubuntu 18.04 version
GDAL: gdal-3.1.0
Proj: proj-7.0.1
Geos: geos-3.8.1

** Any help will be highly Appreciated ***

Puneet Makhija

unread,
Jun 16, 2020, 6:36:08 AM6/16/20
to Django users
Please reply please please please please 

RANGA BHARATH JINKA

unread,
Jun 16, 2020, 7:14:45 AM6/16/20
to django...@googlegroups.com
Hi, 

    If you want to work with maps u can use foilum package. Watch foilum video of traversy media on youtube. On seeing your error, it is saying that the loation path is not correct. It is not able to find the file path correctly. Instead use python os module to locate the file exactly. Ex:- os.path.join(BASE_DIR, 'YOUR-FILE-NAME').

I hope this helps. Thank you.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c307f59c-440e-4bba-8f00-586f1bdab3bco%40googlegroups.com.


--
Thanks and Regards

J. Ranga Bharath
cell: 9110334114

RANGA BHARATH JINKA

unread,
Jun 16, 2020, 7:15:53 AM6/16/20
to django...@googlegroups.com

Kasper Laudrup

unread,
Jun 16, 2020, 10:40:46 AM6/16/20
to django...@googlegroups.com
Hi Puneet,

On 15/06/2020 09.08, Puneet Makhija wrote:
> As i am Stuck in this Error from 2 days. But cant get the Solution why
> this was Happening
> I am getting an Error:
> self._handle =_dlopen(self._name,mode)
>    indusli |OSError:/usr/local/lib/libgdal.so:cannot open shared
> objectfile:Nosuch file ordirectory

Does /usr/local/lib/libgdal.so exist?

The error seems to indicate that it doesn't. Did you install libgdal and
how?

Using /usr/local as a path on a Linux system usually indicates that is
was installed manually from sources. Why not install it from your
package manager, eg.:

# sudo apt-get install libgdal20

should be possible on Ubuntu 18.04.

Kind regards,

Kasper Laudrup
Reply all
Reply to author
Forward
0 new messages