[python-sybase] Problems installing python-sybase 0.39 on CentOS 5 64-bit

pydev at rscorp.ab.ca pydev at rscorp.ab.ca
Sat Oct 4 08:10:54 EST 2008


Hello,

First of all, a big thanks to the developers of this - I look forward to
using it and appreciate their efforts immensely.

Secondly, I'm not really strong in the systems side of things - esp. with
compiling (installing/configuring apache, etc. is fine... just not too far
off the beaten trail) so sometimes things get a bit bumpy, like, well,
now. ;-)

I have downloaded the Sybase libraries (actually the whole ASE) from
sybase.com and python-sybase 0.39. I'm using the CentOS RPM of FreeTDS &
FreeTDS-devel version 0.64-11 and all is running on a 64-bit Opteron box.
The CentOS install is pretty straight-forward, no custom kernels or
anything like that. Oh yeah, Python is 2.4.3 on this machine.

While I've tried many things, I'll only describe the last setup that also
failed dismally (below).

For convenience, I moved the Sybase libraries to /usr/lib64/sybase and set
the environtment variable:
    export SYBASE=/usr/lib64/sybase.

I then ran
    python setup.py build_ext -D HAVE_FREETDS

And got this:

Found libraries at /usr/lib64/sybase/lib/libsybtcl_r64.a
Found libraries at /usr/lib64/sybase/lib/libsybblk_r64.a
Found libraries at /usr/lib64/sybase/lib/libsybct_r64.a
Found libraries at /usr/lib64/sybase/lib/libsybcs_r64.a
Found libraries at /usr/lib64/sybase/lib/libsybtcl_r64.a
Found libraries at /usr/lib64/sybase/lib/libsybcomn_r64.a
Found libraries at /usr/lib64/sybase/lib/libsybintl_r64.a
running build_ext

Then:
    python setup.py install

Found libraries at /usr/lib64/sybase/lib/libsybtcl_r64.a
Found libraries at /usr/lib64/sybase/lib/libsybblk_r64.a
Found libraries at /usr/lib64/sybase/lib/libsybct_r64.a
Found libraries at /usr/lib64/sybase/lib/libsybcs_r64.a
Found libraries at /usr/lib64/sybase/lib/libsybtcl_r64.a
Found libraries at /usr/lib64/sybase/lib/libsybcomn_r64.a
Found libraries at /usr/lib64/sybase/lib/libsybintl_r64.a
running install
running bdist_egg
running egg_info
writing python_sybase.egg-info/PKG-INFO
writing top-level names to python_sybase.egg-info/top_level.txt
writing dependency_links to python_sybase.egg-info/dependency_links.txt
reading manifest file 'python_sybase.egg-info/SOURCES.txt'
writing manifest file 'python_sybase.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
creating build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.4/Sybase.py -> build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.4/sybasect.so ->
build/bdist.linux-x86_64/egg
byte-compiling build/bdist.linux-x86_64/egg/Sybase.py to Sybase.pyc
creating stub loader for sybasect.so
byte-compiling build/bdist.linux-x86_64/egg/sybasect.py to sybasect.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying python_sybase.egg-info/PKG-INFO ->
build/bdist.linux-x86_64/egg/EGG-INFO
copying python_sybase.egg-info/SOURCES.txt ->
build/bdist.linux-x86_64/egg/EGG-INFO
copying python_sybase.egg-info/dependency_links.txt ->
build/bdist.linux-x86_64/egg/EGG-INFO
copying python_sybase.egg-info/top_level.txt ->
build/bdist.linux-x86_64/egg/EGG-INFO
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents...
creating 'dist/python_sybase-0.39-py2.4-linux-x86_64.egg' and adding
'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing python_sybase-0.39-py2.4-linux-x86_64.egg
Removing
/usr/lib64/python2.4/site-packages/python_sybase-0.39-py2.4-linux-x86_64.egg
Copying python_sybase-0.39-py2.4-linux-x86_64.egg to
/usr/lib64/python2.4/site-packages
python-sybase 0.39 is already the active version in easy-install.pth

Installed
/usr/lib64/python2.4/site-packages/python_sybase-0.39-py2.4-linux-x86_64.egg
Processing dependencies for python-sybase==0.39
Finished processing dependencies for python-sybase==0.39


And finally in Python I try to import Sybase:

Python 2.4.3 (#1, Mar 14 2007, 19:01:42)
[GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Sybase
/usr/lib64/python2.4/site-packages/python_sybase-0.39-py2.4-linux-x86_64.egg/sybasect.py:3:
UserWarning: Module Sybase was already imported from Sybase.pyc, but
/usr/lib64/python2.4/site-packages/python_sybase-0.39-py2.4-linux-x86_64.egg
is being added to sys.path
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "Sybase.py", line 20, in ?
    from sybasect import *
  File "build/bdist.linux-x86_64/egg/sybasect.py", line 7, in ?
  File "build/bdist.linux-x86_64/egg/sybasect.py", line 6, in __bootstrap__
ImportError: libsybtcl_r64.so: cannot open shared object file: No such
file or directory


I _know_ this isn't how it is supposed to go, but I was looking to see if
I could find an error that made sense to me, so I copied the missing
object file into 'site-packages' and then got this error:

>>> import Sybase
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "Sybase.py", line 20, in ?
    from sybasect import *
  File
"/usr/lib64/python2.4/site-packages/python_sybase-0.39-py2.4-linux-x86_64.egg/sybasect.py",
line 7, in ?
  File
"/usr/lib64/python2.4/site-packages/python_sybase-0.39-py2.4-linux-x86_64.egg/sybasect.py",
line 4, in __bootstrap__
  File
"/usr/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg/pkg_resources.py",
line 840, in resource_filename
    return get_provider(package_or_requirement).get_resource_filename(
  File
"/usr/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg/pkg_resources.py",
line 1307, in get_resource_filename
    eagers = self._get_eager_resources()
  File
"/usr/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg/pkg_resources.py",
line 1374, in _get_eager_resources
    eagers.extend(self.get_metadata_lines(name))
  File
"/usr/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg/pkg_resources.py",
line 1140, in get_metadata_lines
    return yield_lines(self.get_metadata(name))
  File
"/usr/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg/pkg_resources.py",
line 1137, in get_metadata
    return self._get(self._fn(self.egg_info,name))
  File
"/usr/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg/pkg_resources.py",
line 1197, in _get
    return self.loader.get_data(path)
zipimport.ZipImportError: bad local file header in
/usr/lib64/python2.4/site-packages/python_sybase-0.39-py2.4-linux-x86_64.egg


So, my hunch is I have not put the shared object files in the right place,
for one, and that I haven't a clue otherwise ;-)

Any guidance would be welcomed,

Thank you, in advance, for your help.

Scott



More information about the Python-sybase mailing list