1

我试图在Elastic Beanstalk上安装GhostScript 9.10,因为目前只有Ghostscript 8.70可通过yum包使用。Elastic Beanstalk配置在尝试安装GhostScript 9.10时失败

安装通过SSH在EC2实例上工作,但配置文件总是失败,我不明白是什么原因。

这里是我的.ebextensions配置文件:

commands: 
    01_admin_rights: 
     command: "sudo su" 
    02_get_gs: 
     command: "curl -O http://downloads.ghostscript.com/public/old-gs-releases/ghostscript-9.10.tar.gz" 
    03_extract_gs: 
     command: "tar -xzf ghostscript-9.10.tar.gz" 
    04_cd_gs: 
     command: "cd ghostscript-9.10" 
    05_configure_gs: 
     command: "bash configure" 
    06_install_gs: 
     command: "make install" 
    07_so_gs: 
     command: "make so" 
    08_reboot: 
     command: "reboot" 

而且这里有云弹性魔豆错误日志部:

[2016-06-21T12:22:52.720Z] INFO [24703] - [Application update Come on #[email protected]/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/prebuild_2__Staging/Command 01_admin_rights] : Starting activity... 
[2016-06-21T12:22:52.757Z] INFO [24703] - [Application update Come on #[email protected]/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/prebuild_2__Staging/Command 01_admin_rights] : Completed activity. 
[2016-06-21T12:22:52.757Z] INFO [24703] - [Application update Come on #[email protected]/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/prebuild_2__Staging/Command 02_get_gs] : Starting activity... 
[2016-06-21T12:22:53.524Z] INFO [24703] - [Application update Come on #[email protected]/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/prebuild_2__Staging/Command 02_get_gs] : Completed activity. Result: 
% Total % Received % Xferd Average Speed Time Time  Time Current 
Dload Upload Total Spent Left Speed 

0  0 0  0 0  0  0  0 --:--:-- --:--:-- --:--:--  0 
100 33.6M 100 33.6M 0  0 49.2M  0 --:--:-- --:--:-- --:--:-- 49.2M 

[2016-06-21T12:22:53.524Z] INFO [24703] - [Application update Come on #[email protected]/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/prebuild_2__Staging/Command 03_extract_gs] : Starting activity... 
[2016-06-21T12:22:55.066Z] INFO [24703] - [Application update Come on #[email protected]/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/prebuild_2__Staging/Command 03_extract_gs] : Completed activity. 
[2016-06-21T12:22:55.066Z] INFO [24703] - [Application update Come on #[email protected]/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/prebuild_2__Staging/Command 04_cd_gs] : Starting activity... 
[2016-06-21T12:22:55.069Z] INFO [24703] - [Application update Come on #[email protected]/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/prebuild_2__Staging/Command 04_cd_gs] : Completed activity. 
[2016-06-21T12:22:55.070Z] INFO [24703] - [Application update Come on #[email protected]/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/prebuild_2__Staging/Command 05_configure_gs] : Starting activity... 
[2016-06-21T12:22:55.073Z] INFO [24703] - [Application update Come on #[email protected]/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/prebuild_2__Staging/Command 05_configure_gs] : Activity execution failed, because: bash: configure: No such file or directory 
(ElasticBeanstalk::ExternalInvocationError) 
[2016-06-21T12:22:55.073Z] INFO [24703] - [Application update Come on #[email protected]/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/prebuild_2__Staging/Command 05_configure_gs] : Activity failed. 

据我所知,命令5失败,因为该文件不存在。但是,当我通过SSH手动执行这些步骤时,文件就存在了,所有命令都可以按此顺序执行。

我错过了什么?

编辑: 我与配置参数发挥各地,并试图:

/斌/ bash下的./configure

的./configure

庆典的./configure

所有参数失败,并出现相同的错误“没有这样的文件或目录。” 如果我通过SSH连接并输入其中一个配置命令,那么它的工作原理没有任何问题。

有人知道这是怎么回事?

回答

0

我认为这可能是因为单独的命令不能保持环境或当前目录之间的一致性。其中一个命令是cd,但我认为更改的目录不会保留到下一个命令。尝试所有命令组合成一个,比如这个:

command: | 
    cd directory 
    ./configure 

此外,ebextensions以root身份运行,所以你可能不需要在一开始sudo su

相关问题