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.

posta 2 anni fa1650 visualizzazioni
2 Risposte
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
ESPERTO
con risposta 2 anni fa
0

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

con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande