kata-csc / ckanext-kata

Kata extension for CKAN
GNU Affero General Public License v3.0
8 stars 4 forks source link

Installing this with oaipmh plugin #8

Open xbian opened 4 years ago

xbian commented 4 years ago

Hi

I was trying to install the oaipmh plugin, then I realised this plugin has to be installed first but it has error:

(venv)ckan@8e81457823b2:~/venv/src$ pip install -e git+https://github.com/kata-csc/ckanext-kata.git#egg=ckanext-kata
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Obtaining ckanext-kata from git+https://github.com/kata-csc/ckanext-kata.git#egg=ckanext-kata
  Cloning https://github.com/kata-csc/ckanext-kata.git to ./ckanext-kata
  Running command git clone -q https://github.com/kata-csc/ckanext-kata.git /usr/lib/ckan/venv/src/ckanext-kata
Collecting python-ldap>=2.4.16 (from ckanext-kata)
  Downloading https://files.pythonhosted.org/packages/ea/93/596f875e003c770447f4b99267820a0c769dd2dc3ae3ed19afe460fcbad0/python-ldap-3.2.0.tar.gz (367kB)
     |################################| 368kB 5.0MB/s 
Collecting pyasn1>=0.3.7 (from python-ldap>=2.4.16->ckanext-kata)
  Downloading https://files.pythonhosted.org/packages/62/1e/a94a8d635fa3ce4cfc7f506003548d0a2447ae76fd5ca53932970fe3053f/pyasn1-0.4.8-py2.py3-none-any.whl (77kB)
     |################################| 81kB 10.6MB/s 
Collecting pyasn1_modules>=0.1.5 (from python-ldap>=2.4.16->ckanext-kata)
  Downloading https://files.pythonhosted.org/packages/95/de/214830a981892a3e286c3794f41ae67a4495df1108c3da8a9f62159b9a9d/pyasn1_modules-0.2.8-py2.py3-none-any.whl (155kB)
     |################################| 163kB 12.4MB/s 
Installing collected packages: pyasn1, pyasn1-modules, python-ldap, ckanext-kata
  Running setup.py install for python-ldap ... error
    ERROR: Complete output from command /usr/lib/ckan/venv/bin/python2 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-gRzcGZ/python-ldap/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-p9pIHf/install-record.txt --single-version-externally-managed --compile --install-headers /usr/lib/ckan/venv/include/site/python2.7/python-ldap:
    ERROR: running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-2.7
    copying Lib/ldapurl.py -> build/lib.linux-x86_64-2.7
    copying Lib/ldif.py -> build/lib.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/logger.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/__init__.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/async.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/functions.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/filter.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/constants.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/compat.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/sasl.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/resiter.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/asyncsearch.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/dn.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/modlist.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/ldapobject.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/syncrepl.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/pkginfo.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/cidict.py -> build/lib.linux-x86_64-2.7/ldap
    creating build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/deref.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/__init__.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/pwdpolicy.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/readentry.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/ppolicy.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/simple.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/libldap.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/psearch.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/sessiontrack.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/openldap.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/pagedresults.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/sss.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/vlv.py -> build/lib.linux-x86_64-2.7/ldap/controls
    creating build/lib.linux-x86_64-2.7/ldap/extop
    copying Lib/ldap/extop/__init__.py -> build/lib.linux-x86_64-2.7/ldap/extop
    copying Lib/ldap/extop/dds.py -> build/lib.linux-x86_64-2.7/ldap/extop
    creating build/lib.linux-x86_64-2.7/ldap/schema
    copying Lib/ldap/schema/subentry.py -> build/lib.linux-x86_64-2.7/ldap/schema
    copying Lib/ldap/schema/__init__.py -> build/lib.linux-x86_64-2.7/ldap/schema
    copying Lib/ldap/schema/tokenizer.py -> build/lib.linux-x86_64-2.7/ldap/schema
    copying Lib/ldap/schema/models.py -> build/lib.linux-x86_64-2.7/ldap/schema
    creating build/lib.linux-x86_64-2.7/slapdtest
    copying Lib/slapdtest/__init__.py -> build/lib.linux-x86_64-2.7/slapdtest
    copying Lib/slapdtest/_slapdtest.py -> build/lib.linux-x86_64-2.7/slapdtest
    running egg_info
    writing requirements to Lib/python_ldap.egg-info/requires.txt
    writing Lib/python_ldap.egg-info/PKG-INFO
    writing top-level names to Lib/python_ldap.egg-info/top_level.txt
    writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt
    reading manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    no previously-included directories found matching 'Doc/.build'
    writing manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
    creating build/lib.linux-x86_64-2.7/slapdtest/certs
    copying Lib/slapdtest/certs/README -> build/lib.linux-x86_64-2.7/slapdtest/certs
    copying Lib/slapdtest/certs/ca.conf -> build/lib.linux-x86_64-2.7/slapdtest/certs
    copying Lib/slapdtest/certs/ca.pem -> build/lib.linux-x86_64-2.7/slapdtest/certs
    copying Lib/slapdtest/certs/client.conf -> build/lib.linux-x86_64-2.7/slapdtest/certs
    copying Lib/slapdtest/certs/client.key -> build/lib.linux-x86_64-2.7/slapdtest/certs
    copying Lib/slapdtest/certs/client.pem -> build/lib.linux-x86_64-2.7/slapdtest/certs
    copying Lib/slapdtest/certs/gencerts.sh -> build/lib.linux-x86_64-2.7/slapdtest/certs
    copying Lib/slapdtest/certs/gennssdb.sh -> build/lib.linux-x86_64-2.7/slapdtest/certs
    copying Lib/slapdtest/certs/server.conf -> build/lib.linux-x86_64-2.7/slapdtest/certs
    copying Lib/slapdtest/certs/server.key -> build/lib.linux-x86_64-2.7/slapdtest/certs
    copying Lib/slapdtest/certs/server.pem -> build/lib.linux-x86_64-2.7/slapdtest/certs
    running build_ext
    building '_ldap' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/Modules
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=3.2.0 -DLDAPMODULE_AUTHOR=python-ldap project -DLDAPMODULE_LICENSE=Python style -IModules -I/usr/include/python2.7 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-2.7/Modules/LDAPObject.o
    In file included from Modules/LDAPObject.c:8:0:
    Modules/constants.h:7:18: fatal error: lber.h: No such file or directory
     #include "lber.h"
                      ^
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command "/usr/lib/ckan/venv/bin/python2 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-gRzcGZ/python-ldap/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-p9pIHf/install-record.txt --single-version-externally-managed --compile --install-headers /usr/lib/ckan/venv/include/site/python2.7/python-ldap" failed with error code 1 in /tmp/pip-install-gRzcGZ/python-ldap/

could you help with this please?

p.s. I edited this issue as I pasted wrong stuff earlier..

Many thanks @xbian

frafra commented 4 years ago

ckanext-kata requires LDAP development files to be available, even if I do nott hink that should not be a hard requirement.

For Debian you can install libldap2-dev libsasl2-dev libssl-dev python-dev.

Meepu commented 4 years ago

This project is no longer maintained. Neither is https://github.com/kata-csc/ckanext-oaipmh, which I believe you're trying to install.

The newer version of CSC OAI-PMH plugin, https://github.com/CSCfi/metax-ckanext-oaipmh, no longer requires installation of ckanext-kata. I recommend you see if that code would meet your needs.