Issues with ```mojo build``` accross different OSes (fedora 42, debian 12 bookworm)

This is the error i am encountering every time, regardless of platform
user@node1~/life# mojo build -I ./ life.mojo -o ./life
/usr/bin/ld: cannot find -lz: No such file or directory
/usr/bin/ld: cannot find -ltinfo: No such file or directory
collect2: error: ld returned 1 exit status
mojo: error: failed to link executable
user@node1~/life# mojo build -I ./ life.mojo -o ./life
/usr/bin/ld: cannot find -lz: No such file or directory
/usr/bin/ld: cannot find -ltinfo: No such file or directory
collect2: error: ld returned 1 exit status
mojo: error: failed to link executable
EDIT1 typed 42 by accident, its actually fedora 41 the stable release
4 Replies
matter1
matter1OP2w ago
The magic cli was installed using the guide from here https://docs.modular.com/mojo/manual/get-startede
matter1
matter1OP2w ago
I can do magic mojo run <mojo_file> and it works, but when it comes to building something...well, that's another story I am guessing that there is something missing from my setups, but can't pin point exactly what
DobyDabaDu
DobyDabaDu2w ago
sudo apt-get install zlib1g-dev
sudo apt-get install zlib1g-dev
Try this
matter1
matter1OP2w ago
Worked

Did you find this page helpful?