【问题标题】:PluginNotFoundException when installing CKAN extension安装 CKAN 扩展时出现 PluginNotFoundException
【发布时间】:2015-11-27 07:17:35
【问题描述】:

我想安装一个 CKAN 扩展(插件),但不知道如何安装。 这是执行的程序:

  1. 文件下载: 下载目的地:/usr/lib/ckan/default/src/ckan
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/lib/ckan/default/src/ckan/
    垃圾箱/
    ckan/
    ckan-egg-info/
    ckanext-geoview/
    ..等

    /usr/lib/ckan/default/src/pip-delete-this-directory.txt
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2.安装:
'$ cd /usr/lib/ckan/default/src/ckan'
'$ git clone https://github.com/ckan/ckanext-geoview.git'
'$ cd ckanext-geoview'
'$ python setup.py 开发'

3.将其添加到您的配置文件中:
'$ vi /etc/ckan/default/development.ini'

我更改了以下内容。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ckan.plugins = resource_proxy geo_view .....(其他插件...)

ckan.views.default_views = ... geo_view
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

4.重新加载Apache:
'$ sudo service apache2 重新加载'

5.ckan 数据库初始化:
'$ su -s /bin/bash - ckan'
'$ .默认/bin/激活'
'$ cd /usr/lib/ckan/default/src/ckan'
'$ /usr/lib/ckan/default/bin/paster --plugin=ckan db init --config=/etc/ckan/default/development.ini'

错误信息:
ckan.plugins.core.PluginNotFoundException: geo_view

【问题讨论】:

    标签: python-2.7 ckan


    【解决方案1】:

    PluginNotFoundException 表示 CKAN 在 config 文件(ckan.plugins 下)中看到了它,但在 python 环境中没有找到它。

    我怀疑你在执行第 2 步时没有激活你的 python 环境。

    我还注意到您在 ckan 源目录中克隆了 ckanext-geoview - 最好将它放在一个目录中。要解决这个问题,您可以这样做:

    mv /usr/lib/ckan/default/src/ckan/ckanext-geoview /usr/lib/ckan/default/src/
    

    现在尝试再次将其安装到您的 python 环境中:

    source /usr/lib/ckan/default/bin/activate
    cd /usr/lib/ckan/default/src/ckanext-geoview
    python setup.py develop
    

    并重新加载 CKAN (paster 或 apache)

    【讨论】:

    • 谢谢。它能够安全地解决。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-07-09
    • 2015-12-31
    • 2011-05-27
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多