0

Ubuntu 10.04 の仮想マシンに CKAN 1.8 をインストールしようとしています。

インストールは問題なく終了しましたが、std インスタンスを作成すると、Python で解決できないエラーが表示されます。

誰でもこれで私を助けることができますか?

ターミナル内のメッセージの転写:

egov@egov-VirtualBox:~$ sudo ckan-create-instance std default.vm.buildkit yes
Installing or upgrading CKAN std ...
Ensuring users and groups are set up correctly ...
Ensuring directories exist for std CKAN INSTANCE ...
Disabling the crontab for the ckanstd user ...
Putting CKAN into maintenance mode ...
Site std disabled.
To activate the new configuration, you need to run:
  service apache2 reload
Enabling site std.maint.
To activate the new configuration, you need to run:
  service apache2 reload
 * Reloading web server config apache2                                                                 
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
                                                                                                [ OK ]
Setting log file permissions so that both Apache and cron jobs can log to the same place ...
Ensuring who.ini file exists ...
Ensuring wsgi.py file exists ...
Making sure PostgreSQL is running ...
Setting the password of the std user in PostgreSQL
Setting the std user password ...
ALTER ROLE
Ensuring the std database exists ...
Overwriting the existing Apache config ...
Performing any database upgrades ...

Traceback (most recent call last):
  File "/usr/bin/paster", line 4, in <module>
    command.run()
  File "/usr/lib/python2.7/dist-packages/paste/script/command.py", line 104, in run
    invoke(command, command_name, options, args[1:])
  File "/usr/lib/python2.7/dist-packages/paste/script/command.py", line 143, in invoke
    exit_code = runner.run(args)
  File "/usr/lib/python2.7/dist-packages/paste/script/command.py", line 238, in run
    result = self.command()
  File "/usr/lib/pymodules/python2.7/ckan/lib/cli.py", line 120, in command
    self._load_config()
  File "/usr/lib/pymodules/python2.7/ckan/lib/cli.py", line 82, in _load_config
    load_environment(conf.global_conf, conf.local_conf)
  File "/usr/lib/pymodules/python2.7/ckan/config/environment.py", line 141, in load_environment
    p.load('synchronous_search')
  File "/usr/lib/pymodules/python2.7/ckan/plugins/core.py", line 122, in load
    service = _get_service(plugin)
  File "/usr/lib/pymodules/python2.7/ckan/plugins/core.py", line 77, in _get_service
    return plugin.load()(name=name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1989, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/pymodules/python2.7/ckan/lib/search/__init__.py", line 2, in <module>
    from pylons import config, c
ImportError: cannot import name c


Bringing the std INSTANCE out of maintenance mode ...
Site std.maint disabled.
To activate the new configuration, you need to run:
  service apache2 reload
Enabling site std.
To activate the new configuration, you need to run:
  service apache2 reload
 * Reloading web server config apache2


apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
                                                                                                    [ OK ]
    Reloading apache ...
     * Reloading web server config apache2                                                                 
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
                                                                                                    [ OK ]
    Enabling crontab for the ckanstd user ...
4

1 に答える 1

1

問題はスタック トレースの最後にあります。

File "/usr/lib/pymodules/python2.7/ckan/lib/search/__init__.py", line 2, in <module>
  from pylons import config, c
ImportError: cannot import name c

これは、pylons (必要なライブラリ) が正しくインストールされない可能性があることを示唆しています。これを確認するには、次のようにします。

 $ python
 >>> import pylons

それが失敗した場合、インストールに何か問題があり、pylons がインストールされていません (本来あるべき姿)。

その時点で、再インストールを試す価値があります。

これが役立つかどうか (または役に立たないか) をお知らせください。さらにサポートを試みます。

于 2013-01-18T20:39:45.030 に答える