在centos 7.1上的mesos 0.23.0上运行自己的python框架

41zrol4v  于 2021-06-21  发布在  Mesos
关注(0)|答案(2)|浏览(313)

我想在centos 7.1上运行的mesos集群(0.23)上运行一个简单的python框架。我在中间层安装了中间层软件包,一切正常(我正在进行一些马拉松式的工作)。但当我想开始用python开发自己的框架时,我被卡住了。我使用了jamesj porter的这个例子,我知道他在mesos0.20.0上测试了它,但是我认为我可以在mesos0.23上运行它。
一开始我从python得到一个导入错误,它说mesos.native和mesos.interface不可用。然后我尝试了一个简单的\u安装,但是我找不到mesos.native,尝试安装所有“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

我错过什么了吗?

6mw9ycah

6mw9ycah1#

我发现了我的错误。我刚刚错过了从中间层安装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

这里是所有鸡蛋的链接。

hpcdzsge

hpcdzsge2#

我想你的软件包坏了,你最好从软件包安装东西。我使用了以下顺序来缓解问题:


# Fetch the Apache Maven repo file.

$ sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo

# 'Mesos > 0.21.0' requires 'subversion > 1.8' devel package, which is

# not available in the default repositories.

# Add the WANdisco SVN repo file: '/etc/yum.repos.d/wandisco-svn.repo' with content:

  [WANdiscoSVN]
  name=WANdisco SVN Repo 1.9
  enabled=1
  baseurl=http://opensource.wandisco.com/centos/7/svn-1.9/RPMS/$basearch/
  gpgcheck=1
  gpgkey=http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco

# Install essential development tools.

$ sudo yum groupinstall -y "Development Tools"

# Install other Mesos dependencies.

$ sudo yum install -y apache-maven python-devel java-1.7.0-openjdk-devel zlib-devel libcurl-devel openssl-devel cyrus-sasl-devel cyrus-sasl-md5 apr-devel subversion-devel apr-util-devel

相关问题