【问题标题】:DataStax OpsCenter 5.1.0 fails to start due to python 'ImportError'由于 python 'ImportError',DataStax OpsCenter 5.1.0 无法启动
【发布时间】:2015-06-02 11:27:55
【问题描述】:

尝试通过在 /opt/opscenter-5.1.0/bin 中运行 ./opscenter 在 Ubuntu 14.04 64 位上启动 OpsCenter 5.1.0 的 tarball 安装失败,并出现以下错误:

Traceback (most recent call last): File "./bin/twistd", line 28, in <module> from twisted.scripts.twistd import run ImportError: cannot import name run

我的python版本是2.7.6:
$ python --version Python 2.7.6

并尝试将扭曲的结果导入:
$ python -c "import twisted; print twisted" Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named twisted

opscenter 中 PYTHONPATH 的值如下所示:
PYTHONPATH: ./src:/usr/lib/python2.7/site-packages:./src/lib/python2.7/site-packages:./lib/python2.7/site-packages:./lib/py:./lib/py-debian/2.7/amd64::

这里出了什么问题,有人可以建议一个值得尝试 Python 新手的解决方法吗?

【问题讨论】:

  • 安装 Twisted。这对新手来说足够简单和快速:)
  • 看起来 opscenter 与它自己的 Twisted 版本捆绑在一起,安装 Twisted 后我遇到了同样的错误。
  • 请尝试bin/opscenter -f在前台运行。

标签: python cassandra datastax opscenter


【解决方案1】:

问题是由于捆绑的 python 库之间缺少符号链接。特别是,在 /lib/py-debian/2.7/amd64/twisted 文件 _version.py、plugin.py、init.py 和copyright.py 丢失。

最初,我使用 tarTree 中的 gradle 副本来提取存档,导致缺少符号链接。改用 tar -xzf 可以解决问题,并且 opscenter 会按预期启动。

【讨论】:

    猜你喜欢
    • 2017-08-02
    • 2013-10-30
    • 2017-01-07
    • 2023-04-07
    • 2015-06-04
    • 2014-04-20
    • 2015-10-23
    • 1970-01-01
    • 2016-05-15
    相关资源
    最近更新 更多