# Getting exec: zig-out/bin/main: not found error

**URL:** <https://forum.codecrafters.io/t/getting-exec-zig-out-bin-main-not-found-error/15934>\
**Category:** Challenges\
**Tags:** challenge:shell\
**Created:** [February 25, 2026, 4:31am UTC](https://forum.codecrafters.io/t/getting-exec-zig-out-bin-main-not-found-error/15934 "2026-02-25T04:31:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chaituvarma-109](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/chaituvarma-109/32/6686_2.png) [@Chaituvarma-109](https://forum.codecrafters.io/u/Chaituvarma-109)\
**Post date:** [February 25, 2026, 4:31am UTC](https://forum.codecrafters.io/t/getting-exec-zig-out-bin-main-not-found-error/15934/1 "2026-02-25T04:31:50Z")

</div>

I’m stuck on Stage #ZV2.

when i run codecrafters test or codecrafters submit get error as in below screen shot.

 ![Screenshot_20260225_094824](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/b/a/ba6b8225f2d7970101e346a95abbda525b7173a8.png)

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [February 25, 2026, 4:33am UTC](https://forum.codecrafters.io/t/getting-exec-zig-out-bin-main-not-found-error/15934/2 "2026-02-25T04:33:15Z")

</div>

Hey @Chaituvarma-109, could you [upload your code to GitHub](https://docs.codecrafters.io/features/publish-to-github) and share the link? It will be much easier to debug if I can run it directly.

---

<div class="post-metadata">

**Author:** ![Chaituvarma-109](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/chaituvarma-109/32/6686_2.png) [@Chaituvarma-109](https://forum.codecrafters.io/u/Chaituvarma-109)\
**Post date:** [February 25, 2026, 4:38am UTC](https://forum.codecrafters.io/t/getting-exec-zig-out-bin-main-not-found-error/15934/3 "2026-02-25T04:38:45Z")

</div>

[github]([https://github.com/Chaituvarma-109/codecrafters-shell-zig.git\](https://github.com/Chaituvarma-109/codecrafters-shell-zig.git%5C))

---

<div class="post-metadata">

**Author:** ![Zeviraty](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/zeviraty/32/13507_2.png) [@Zeviraty](https://forum.codecrafters.io/u/Zeviraty)\
**Post date:** [February 25, 2026, 5:11pm UTC](https://forum.codecrafters.io/t/getting-exec-zig-out-bin-main-not-found-error/15934/5 "2026-02-25T17:11:33Z")

</div>

I am also stuck on the same stage with a similar problem…?  
There could be some issue with the test runner for that specific stage not being able to open files?

---

<div class="post-metadata">

**Author:** ![Chaituvarma-109](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/chaituvarma-109/32/6686_2.png) [@Chaituvarma-109](https://forum.codecrafters.io/u/Chaituvarma-109)\
**Post date:** [February 26, 2026, 5:39am UTC](https://forum.codecrafters.io/t/getting-exec-zig-out-bin-main-not-found-error/15934/6 "2026-02-26T05:39:37Z")

</div>

hey, did the problem solved. still stuck with same problem.

---

<div class="post-metadata">

**Author:** ![Chaituvarma-109](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/chaituvarma-109/32/6686_2.png) [@Chaituvarma-109](https://forum.codecrafters.io/u/Chaituvarma-109)\
**Post date:** [February 27, 2026, 4:57pm UTC](https://forum.codecrafters.io/t/getting-exec-zig-out-bin-main-not-found-error/15934/7 "2026-02-27T16:57:03Z")

</div>

@andy1li i am still stuck with same problem  
my [project github](https://github.com/Chaituvarma-109/codecrafters-shell-zig).

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [February 28, 2026, 2:03am UTC](https://forum.codecrafters.io/t/getting-exec-zig-out-bin-main-not-found-error/15934/8 "2026-02-28T02:03:27Z")

</div>

@Chaituvarma-109 Sorry for the delayed response!

To fix this, please update `.codecrafters/run.sh` to the following:

```auto
#!/bin/sh

set -e

exec "$(dirname "$0")"/zig-out/bin/main "$@"

```

Let me know if it still fails after the update.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/7/0/700657133935c15703e22c7c8870394f6e6dc27d.svg) [@system](https://forum.codecrafters.io/u/system)\
**Post date:** [March 5, 2026, 2:14am UTC](https://forum.codecrafters.io/t/getting-exec-zig-out-bin-main-not-found-error/15934/10 "2026-03-05T02:14:50Z")

</div>

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.
