我想在运行于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
我错过了什么吗?
我发现了我的错误。我只是错过了从中层圈安装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
在这里找到所有鸡蛋的链接。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。