Exec format error on Elastic Beanstalk postdeploy script

0

Trying to upgrade my rails app to Elastic Beanstalk on Amazon Linux2. I have the web part working. However, when I try to run a certain postdeploy hook, it fails with "exec format error". From the Rails console, I can run bundle exec whenever --update-cron, and it works. However, when I run the same thing in a postdeploy script, it fails with "exec format error." I've tried /bin/su -c "bundle exec whenever --update-cron", with and without double quotes. I just can't find how to make it work.

feita há 2 anos1650 visualizações
2 Respostas
0

An exec format error almost always means that the CPU architecture that your application was compiled with is not the same as the CPU architecture that you're deploying it to. For example, you might have built your application on an Intel machine, then copied it to an Amazon EC2 Graviton instance. Or you might have built the application on an M1 Mac, then copied it to an Amazon Intel or AMD EC2 instance.

AWS
ESPECIALISTA
respondido há 2 anos
0

If you created the script file on Windows, you have to convert it to Linux format. dos2unix can do that.

respondido há 2 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas