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.

質問済み 2年前1650ビュー
2回答
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
エキスパート
回答済み 2年前
0

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

回答済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ