Skip to content
This repository has been archived by the owner on Apr 15, 2021. It is now read-only.

Installation instructions #14

Open
jgrocha opened this issue Oct 30, 2015 · 2 comments
Open

Installation instructions #14

jgrocha opened this issue Oct 30, 2015 · 2 comments

Comments

@jgrocha
Copy link

jgrocha commented Oct 30, 2015

Hi,

I'm tryng to install ckanext-geoserver with:

cd /usr/lib/ckan/default/src/ckan
. /usr/lib/ckan/default/bin/activate

cd /usr/lib/ckan/default/src
git clone https://github.com/ngds/ckanext-geoserver.git
cd ckanext-geoserver/
pip install -r requirements.txt

This fails with:

Collecting gsconfig (from -r requirements.txt (line 1))
  Using cached gsconfig-1.0.0.tar.gz
Collecting gdal (from -r requirements.txt (line 2))
  Using cached GDAL-2.0.1.tar.gz
    Complete output from command python setup.py egg_info:
    running egg_info
    creating pip-egg-info/GDAL.egg-info
    writing pip-egg-info/GDAL.egg-info/PKG-INFO
    writing top-level names to pip-egg-info/GDAL.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/GDAL.egg-info/dependency_links.txt
    writing manifest file 'pip-egg-info/GDAL.egg-info/SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found

    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-WVvFSH/gdal/setup.py", line 306, in <module>
        **extra )
      File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
        dist.run_commands()
      File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "<string>", line 15, in replacement_run
      File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 206, in find_sources
        mm.run()
      File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 290, in run
        self.add_defaults()
      File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 319, in add_defaults
        sdist.add_defaults(self)
      File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/setuptools/command/sdist.py", line 130, in add_defaults
        build_ext = self.get_finalized_command('build_ext')
      File "/usr/lib/python2.7/distutils/cmd.py", line 312, in get_finalized_command
        cmd_obj.ensure_finalized()
      File "/usr/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
        self.finalize_options()
      File "/tmp/pip-build-WVvFSH/gdal/setup.py", line 196, in finalize_options
        self.gdaldir = self.get_gdal_config('prefix')
      File "/tmp/pip-build-WVvFSH/gdal/setup.py", line 176, in get_gdal_config
        return fetch_config(option)
      File "/tmp/pip-build-WVvFSH/gdal/setup.py", line 129, in fetch_config
        raise gdal_config_error, e""")
      File "<string>", line 4, in <module>
    __main__.gdal_config_error: [Errno 2] No such file or directory

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-WVvFSH/gdal

If I skip the pip install -r requirements.txt and try the installation process with:

pip install -e .
python setup.py build
python setup.py install

The installation process works, but when I ad dthe plugin, the server crashes with:

[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231] Traceback (most recent call last):
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]   File "/etc/ckan/default/apache.wsgi", line 9, in <module>
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]     application = loadapp('config:%s' % config_filepath)
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]     return loadobj(APP, uri, name=name, **kw)
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]     return context.create()
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]     return self.object_type.invoke(self)
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]     return fix_call(context.object, context.global_conf, **context.local_conf)
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/util.py", line 56, in fix_call
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]     val = callable(*args, **kw)
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]   File "/usr/lib/ckan/default/src/ckan/ckan/config/middleware.py", line 58, in make_app
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]     load_environment(conf, app_conf)
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]   File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 232, in load_environment
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]     p.load_all(config)
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]   File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 134, in load_all
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]     load(*plugins)
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]   File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 148, in load
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]     service = _get_service(plugin)
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]   File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 254, in _get_service
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]     return plugin.load()(name=plugin_name)
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2312, in load
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]     return self.resolve()
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2318, in resolve
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]     module = __import__(self.module_name, fromlist=['__name__'], level=0)
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/ckanext_geoserver-0.0.1-py2.7.egg/ckanext/geoserver/plugin.py", line 3, in <module>
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]     import ckanext.geoserver.logic.action as action
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/ckanext_geoserver-0.0.1-py2.7.egg/ckanext/geoserver/logic/action.py", line 3, in <module>
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]     from ckanext.geoserver.model.Geoserver import Geoserver
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/ckanext_geoserver-0.0.1-py2.7.egg/ckanext/geoserver/model/Geoserver.py", line 2, in <module>
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231]     from geoserver.catalog import Catalog
[Fri Oct 30 23:32:08 2015] [error] [client 188.165.15.231] ImportError: No module named geoserver.catalog

So, my question is: how to install geoserver plugin? I'll add the instructions to the readme afterwards.

Thanks in advance.

@bunnis
Copy link

bunnis commented Nov 20, 2015

gdal has shared libraries and the virtual env prevents python fro mseeing them. use this set of commands
sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
$ sudo apt-get update
$ sudo apt-get install libgdal-dev
sudo apt-get build-dep python-imaging
pip install Pillow
pip install gsconfig
export CPLUS_INCLUDE_PATH=/usr/include/gdal
export C_INCLUDE_PATH=/usr/include/gdal
pip install GDAL==1.10.0

pip install usginmodels

@barry1955
Copy link

Hi,
I have just followed bunnis suggestion and then the install process above. No errors so far.
Thank you very much.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants