# Executable wont run on computer without libraries installed

**URL:** <https://forum.crystal-lang.org/t/executable-wont-run-on-computer-without-libraries-installed/408>\
**Category:** Help & Support\
**Created:** [February 11, 2019, 2:04am UTC](https://forum.crystal-lang.org/t/executable-wont-run-on-computer-without-libraries-installed/408 "2019-02-11T02:04:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![vlazar](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/vlazar/32/31_2.png) [@vlazar](https://forum.crystal-lang.org/u/vlazar)\
**Post date:** [February 11, 2019, 6:17am UTC](https://forum.crystal-lang.org/t/executable-wont-run-on-computer-without-libraries-installed/408/2 "2019-02-11T06:17:33Z")

</div>

You can build statically linked programs in Crystal but now it only works on Alpine Linux.

You can install Docker for Mac and use [https://hub.docker.com/r/jrei/crystal-alpine](https://hub.docker.com/r/jrei/crystal-alpine) for building statically linked apps.

Basically in addition to Crystal itself you install all required libraries in Docker [https://github.com/j8r/dockerfiles/blob/master/crystal-alpine/Dockerfile#L6-L22](https://github.com/j8r/dockerfiles/blob/master/crystal-alpine/Dockerfile#L6-L22)

Then use `crystal build --static ...` to build statically linked application. After that you can copy your single binary to another Docker container with Alpine Linux but without Crystal and any mentioned libraries installed and it will work.

UPDATE:  
And you’ll also need this workaround [https://github.com/j8r/dockerfiles/tree/master/crystal-alpine#usage](https://github.com/j8r/dockerfiles/tree/master/crystal-alpine#usage)

---

_[View the full topic](https://forum.crystal-lang.org/t/executable-wont-run-on-computer-without-libraries-installed/408)._
