Page 1 of 1

CentOS 5.3 sqlite library problem

PostPosted: Sat Oct 17, 2009 3:58 am
by lbl-dude
When trying to get the django server up, this error is put into the master.err log and the server fails to load:

File "/data/OMERO/omero_dist/lib/python/django/db/backends/sqlite3/base.py", line 26, in ?
raise ImproperlyConfigured, "Error loading %s module: %s" % (module, e)
django.core.exceptions.ImproperlyConfigured: Error loading pysqlite2 module: /usr/lib/python2.4/site-packages/pysqlite2/_sqlite.so: wrong ELF class: ELFCLASS32

Does anyone know if this is a problem with the pysqlite distribution, or might I have a conflicting library on my system somewhere?

Thanks.

Re: CentOS 5.3 sqlite library problem

PostPosted: Sat Oct 17, 2009 7:43 am
by cxallan
To my knowledge there are no problems with the packages. What's the output of the following three commands:

Code: Select all
uname -an
file /usr/lib/python2.4/site-packages/pysqlite2/_sqlite.so
ldd /usr/lib/python2.4/site-packages/pysqlite2/_sqlite.so

Re: CentOS 5.3 sqlite library problem

PostPosted: Sat Oct 17, 2009 8:49 am
by lbl-dude
myserver# uname -an

Linux myserver 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

myserver# file /usr/lib/python2.4/site-packages/pysqlite2/_sqlite.so
/usr/lib/python2.4/site-packages/pysqlite2/_sqlite.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), stripped

myserver# ldd /usr/lib/python2.4/site-packages/pysqlite2/_sqlite.so

linux-gate.so.1 => (0xffffe000)
libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0xf7eaf000)
libpthread.so.0 => /lib/libpthread.so.0 (0xf7e98000)
libc.so.6 => /lib/libc.so.6 (0xf7d54000)
/lib/ld-linux.so.2 (0x00932000)

Re: CentOS 5.3 sqlite library problem

PostPosted: Mon Oct 19, 2009 10:18 am
by cxallan
Okay. That implies you have a 64-bit (x86_64) version of Python but somehow have a 32-bit version of pysqlite2. Did you install it via easy_install or via an RPM?

Re: CentOS 5.3 sqlite library problem

PostPosted: Mon Oct 19, 2009 7:13 pm
by lbl-dude
Another person did the OS install, and I am just tasked with installing OMERO. Should I install a different version of python or just get and rpm of pysqlite2?

Re: CentOS 5.3 sqlite library problem

PostPosted: Mon Oct 19, 2009 8:04 pm
by lbl-dude
I reinstalled the sqlite library with a 64 bit version from an rpm and it works fine now.

Re: CentOS 5.3 sqlite library problem

PostPosted: Mon Oct 19, 2009 8:08 pm
by cxallan
Good to hear.