本文介绍了elasticbeanstalk gcc和python-devel安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行具有pandas依赖项的flask应用程序.如果未安装python-devel,则无法安装pandas.因此,首先我需要根据该线程安装gcc-c ++和python devel:

I'm trying to run a flask application which has pandas dependency. Without having python-devel installed, pandas cannot be installed. So first I need to install gcc-c++ and python devel according to this thread: 'gcc' failed during pandas build on AWS Elastic Beanstalk

现在,我的.elasticbeanstalk/config.yml看起来像:

branch-defaults:
  default:
    environment: flask-env
    group_suffix: null
global:
  application_name: flask-sample-app
  branch: null
  default_ec2_keyname: flask-sample-app
  default_platform: Python 3.4
  default_region: eu-west-1
  include_git_submodules: true
  instance_profile: null
  platform_name: null
  platform_version: null
  profile: null
  repository: null
  sc: null
  workspace_type: Application
packages:
  yum:
    gcc-c++: []
    python-devel: []

但是成功执行eb deploy命令后,我通过eb ssh连接到它,并发现未安装它.我的config.yml是否正确?

But after successful eb deploy command, I connect to it via eb ssh and see that it wasn't installed. Is my config.yml correct?

推荐答案

当我在.ebextensions而不是.elasticbeanstalk中创建了Yaml文件时,它起作用了.我只是将yaml文件放在错误的目录下.

When I created a yaml file in .ebextensions instead of .elasticbeanstalk, it worked. I was simply putting the yaml file under the wrong directory.

.elasticbeanstalk/pandas.yml:

.elasticbeanstalk/pandas.yml:

packages:
  yum:
    gcc-c++: []
    python3?-devel.x*: []

尝试安装python-devel: []时出现错误:

因此,在我的情况下,正确的devel软件包名称是'python27-devel.x86_64'或'python35-devel.x86_64'

So the correct devel package name, in my case, is either 'python27-devel.x86_64' or 'python35-devel.x86_64'

https://forums.aws.amazon.com/thread.jspa ?threadID = 233268

如何在Red Hat 7上安装python3-devel

这篇关于elasticbeanstalk gcc和python-devel安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-17 16:47