开发者社区> 问答> 正文

在CentOS 7.1的Mesos 0.23.0上运行自己的python框架

我想在运行于CentOS 7.1的Mesos群集(0.23)上运行一个简单的python框架。我在中层软件包上安装了Mesos,一切正常(我正在运行一些Marathon作业)。但是,当我想开始用Python开发自己的框架时,我陷入了困境。我使用了James J Porter的示例,我知道他在mesos 0.20.0上对其进行了测试,但我认为我可以在Mesos 0.23上进行一些工作。

起初,我从python收到导入错误,该错误指出mesos.native和mesos.interface不可用。然后,我尝试执行一个easy_install,但找不到mesos.native,并尝试在以下情况中生成“ ntos”“ mesos”结果:

$ pip install mesos
Collecting mesos
/usr/lib/python2.7/site-packages/pip-7.1.0-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Could not find a version that satisfies the requirement mesos (from versions: )
No matching distribution found for mesos
$ easy_install mesos
Searching for mesos
Reading https://pypi.python.org/simple/mesos/
No local packages or download links found for mesos
error: Could not find suitable distribution for Requirement.parse('mesos')

然后我认为根据入门指南自己建造一切都是一个好主意。但知道我得到以下错误:

$ python hello_mesos.py 
Traceback (most recent call last):
  File "hello_mesos.py", line 7, in <module>
    from mesos.native import MesosExecutorDriver, MesosSchedulerDriver
  File "/usr/lib/python2.7/site-packages/mesos.native-0.23.0-py2.7.egg/mesos/native/__init__.py", line 17, in <module>
    from ._mesos import MesosExecutorDriverImpl
ImportError: libsvn_delta-1.so.1: cannot open shared object file: No such file or directory

当我尝试从源代码构建它时,收到此警告和以下错误:

../配置

checking whether we can build usable Python eggs... In file included from /usr/include/limits.h:26:0,
                 from /usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/limits.h:168,
                 from /usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/syslimits.h:7,
                 from /usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/limits.h:34,
                 from /usr/include/python2.7/Python.h:19,
                 from testpyegg.cpp:1:
/usr/include/features.h:330:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)

^

使:

g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make[2]: *** [master/libmesos_no_3rdparty_la-master.lo] Error 1
make[2]: Leaving directory `/root/mesos-0.23.0/build/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/mesos-0.23.0/build/src'
make: *** [all-recursive] Error 1

我错过了什么吗?

展开
收起
祖安文状元 2020-02-21 15:57:20 1437 0
1 条回答
写回答
取消 提交回答
  • 我发现了我的错误。我只是错过了从中层圈安装python egg的安装:

    wget http://downloads.mesosphere.io/master/centos/7/mesos-0.23.0-py2.7-linux-x86_64.egg
    easy_install mesos-0.23.0-py2.7-linux-x86_64.egg
    
    

    在这里找到所有鸡蛋的链接。

    2020-02-21 15:57:31
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
From Python Scikit-Learn to Sc 立即下载
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载