How To Get Max On Arch Linux
I was trying to figure out how to get Max working on Arch Linux and ran into a few problems such as, "no REPL found for mojo", "couldn't find liblldb on PATH", etc. How do I get it to work?
10 Replies
Are you inside of a magic virtual environment?
MAX and Mojo currently re-use conda environments, via a tool called
magic
, to help with portability.To solve the above issue (assuming your pixi.toml file is all setup),
[Global Install]
1. Install Magic
2. Create a new project using
magic init project name
3. Go into the project folder
4. Use the magic shell
command to create a virtual environment
5. Use the magic add "python==3.12"
command to add python to the project
6. Use the magic add "lldb"
command to add the debugger to the project
7. Use the magic global install max -c conda-forge -c https://conda.modular.com/max/ --expose mojo
command to install mojo globally
8. Go into the directory .magic/envs/defaults/lib
9. Copy the files libpanel.so.6, li panel.so.6.5, libncurses.so.6, and libncurses.so.6.5
to your /usr/lib
directory using the sudo cp -r
command
After doing this, mojo will work perfectly.Where is that from?
Exposing mojo globally is a bad idea, since it requires you to also expose the libraries it depends on, which will mess up a system.
That's what I had to do on Archcraft Linux because Arch Linux doesn't use libncurses rather it uses libncursesw. The Mojo website actually recommends installing mojo globally for those who are independent developers
A step-by-step guide to Magic | Modular
Learn how to get started and get the most out of the Magic.
Go to the section where it says "Install Max and Mojo Globally"
Mojo only officially supports ubuntu, which is where that issue is likely coming from.
It also breaks Fedora.
I'd stick with the per-project version, which is much more portable.
I did it both ways and put all of the needed libraries in a git repo in case I ever need them again
How do you mark a question as solved again?
Right click, apps, Mark Solution
Thank you!