Why won't my StackScript run on Alpine Linux?

Linode Staff

I'm trying to use a StackScript to deploy a Linode running Alpine Linux, and I'm receiving the following error:

can't execute '/root/StackScript': No such file or directory

When I check /root/, there is a file sitting there called StackScript. Why isn't this working?

1 Reply

Alpine Linux does not have bash installed by default. This means that any StackScript that begins with #!/bin/bash will fail to execute. Most StackScripts are written to use bash, so if your script begins with #!/bin/bash, you'll need to change it to use something that's natively supported on Alpine, like #!/bin/ash. I'm admittedly less familiar with ash and its commands/syntax, but you may need to make some updates to your script to account for the different interpreter.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct