【问题标题】:ebextensions: yum does not install packageebextensions: yum 不安装包
【发布时间】:2015-05-01 23:06:56
【问题描述】:

我正在尝试制作一个将安装 wkhtmltopdf 的 ebextensions 文件。

目前看起来是这样的:

packages: 
 yum:
  xorg-x11-fonts-75dpi: []
  libpng: []
  xz: [] 
  urw-fonts: []
  libXext: []
  openssl-devel: []
  libXrender: []
rpm:
   wkhtmltopdf: https://s3-eu-west-1.amazonaws.com/myS3Account/wkhtmltox-0.12.2.1_linux-centos5-amd64.rpm

在这种情况下,wkthmltopdf 无法安装。我收到以下错误:

Failed dependencies:
  xorg-x11-fonts-75dpi is needed by wkhtmltox-1:0.12.2.1-1.x86_64

如果我使用 SSH 连接到我的 EC2 实例,我可以通过手动运行“yum install xorg-x11-fonts-75dpi”,然后运行“wget wkthmltopdf-...”和“rpm --install”来成功安装 wkhtml wkhtmltopdf-..”。如果我跳过 yum 步骤,rpm 会抱怨 wkhtmltopdf 需要 xorg 包。

似乎 ebextensions 在部署时未安装 xorg-x11-fonts-75dpi。我做错了吗?

【问题讨论】:

    标签: amazon-web-services amazon-ec2 amazon-elastic-beanstalk


    【解决方案1】:

    根据文档:

    Packages are processed in the following order: rpm, yum, and then rubygems and python.
    

    Elastic beanstalk 首先处理您的 rpm 包,导致错误并且永远不会访问 yum 包。

    有几种方法可以解决这个问题。

    1) 通过类似的命令运行 rpm 安装

    commands:
        install_wkhtmltox:
            command: yum -y install https://s3-eu-west-1.amazonaws.com/myS3Account/wkhtmltox-0.12.2.1_linux-centos5-amd64.rpm
    

    这应该会通过 yum 自动解决依赖关系。

    2) 将 .ebextensions 文件拆分为两个:01_install_dependencies.config 和 02_install_wkhtmltox.config。在 01 文件中安装 yum 包,在 02 文件中安装 rpm。这样你就可以“覆盖”包安装顺序

    http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html#customize-containers-format-packages

    【讨论】:

    • 嗨,我在使用此扩展安装 ffmpeg 时遇到了这个问题:任何帮助将不胜感激。 ` Yum 没有可用于安装的 commands-06-pecl。 EBExtension 中列出的包安装失败。'
    猜你喜欢
    • 2014-07-31
    • 2020-09-14
    • 1970-01-01
    • 2016-12-26
    • 1970-01-01
    • 1970-01-01
    • 2021-06-04
    • 2016-12-21
    • 1970-01-01
    相关资源
    最近更新 更多