Vaultier对docker/ubuntu/debian(Python)不可用

2024-06-16 09:35:52 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在为我的公司寻找一个好的密码保险箱。我想测试一下保险库,但它比预期的要新。无论是Docker还是其他平台。总是有错误的,如果它的Docker我得到输出。 我不是python专家,但是让pip安装——升级使得安装过程中遗漏了整个应用程序。

我遵循这些指南https://www.vaultier.org/install/

sudo docker run -t -i --name vaultier -p 80:8088 rclick/vaultier:latest -e "VAULTIER_DOMAIN=vaultier.bla.com"
Error: invalid value for -e 'VAULTIER_DOMAIN=vaultier.bla.com': bad logging level name 'VAULTIER_DOMAIN=vaultier.bla.com'
For help, use /usr/bin/supervisord -h

在没有这个值的情况下启动Docker,会发出一个(400个错误请求)

使用Ubuntu:

Traceback (most recent call last):
  File "/opt/vaultier/venv/bin/vaultier", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/pkg_resources.py", line 2720, in <module>
    parse_requirements(__requires__), Environment()
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/pkg_resources.py", line 592, in resolve
    raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (six 1.4.1 (/opt/vaultier/venv/lib/python2.7/site-packages), Requirement.parse('six>=1.7'))

使用Debian:

Traceback (most recent call last):
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/pip/commands/install.py", line 295, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/pip/req.py", line 1436, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/pip/req.py", line 707, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/pip/util.py", line 716, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command /opt/vaultier/venv/bin/python2 -c "import setuptools, tokenize;__file__='/tmp/pip-build-08foqW/psycopg2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-UUDq9M-record/install-record.txt --single-version-externally-managed --compile --install-headers /opt/vaultier/venv/include/site/python2.7 failed with error code 1 in /tmp/pip-build-08foqW/psycopg2

关于如何避免失败或解决这个问题有什么想法吗?

更新

在“六”问题解决之后,我在运行vaultier安装程序时收到一个新错误

      File "/opt/vaultier/venv/bin/vaultier", line 9, in <module>
    load_entry_point('Vaultier==0.7.5', 'console_scripts', 'vaultier')()
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/vaultier/vaultier/runner.py", line 231, in main
    settings_envvar='VAULTIER_CONF'
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/logan/runner.py", line 169, in run_app
    management.execute_from_command_line([runner_name, command] + command_args)
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/vaultier/vaultier/management/commands/setup.py", line 22, in handle
    management.call_command('syncdb')
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 159, in call_command
    return klass.execute(*args, **defaults)
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 415, in handle
    return self.handle_noargs(**options)
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/south/management/commands/syncdb.py", line 68, in handle_noargs
    migrations = migration.Migrations(app_label)
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/south/migration/base.py", line 64, in __call__
    self.instances[app_label] = super(MigrationsMetaclass, self).__call__(app_label_to_app_module(app_label), **kwds)
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/south/migration/base.py", line 90, in __init__
    self.set_application(application, force_creation, verbose_creation)
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/south/migration/base.py", line 154, in set_application
    module = importlib.import_module(self.migrations_module())
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
    __import__(name)
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/kombu/transport/django/migrations/__init__.py", line 16, in <module>
    raise ImproperlyConfigured(SOUTH_ERROR_MESSAGE)
django.core.exceptions.ImproperlyConfigured: 
For South support, customize the SOUTH_MIGRATION_MODULES setting
to point to the correct migrations module:

    SOUTH_MIGRATION_MODULES = {
        'kombu_transport_django': 'kombu.transport.django.south_migrations',
    }

更新2-修复

我在网上找不到任何解决方案,所以我尝试了另一个版本的south,并在那里看到了。。。它起作用了。:)

    >>> DB is initialized, you can now try to run Vaultier using 'vaultier runserver'
(venv)root@Vaultier:/opt/vaultier# vaultier runserver

在来自vaultier的requirements.txt或setup.py中。。。不管你用哪一个。只需设置“South==1.0.2” 别忘了设置“6==1.9”

玩得开心!


Tags: installdjangoinpyselfvenvlibpackages