modularml / mojo

The Mojo Programming Language
https://docs.modular.com/mojo
Other
22.05k stars 2.54k forks source link

[Mojo REPL]: REPL fails to start #703

Open jbulow opened 9 months ago

jbulow commented 9 months ago

Issue description

When starting mojo REPL I get the following error:

error: this file does not represent a loadable dylib
error: couldn't find a REPL for mojo

Steps to reproduce

Install Mojo 1.0 according to (the non-advanced) instruction.

Run mojo (as specified in the "Hello world" example)

Version Info

- Provide Modular CLI version by pasting the output of `modular -v`
mojo 0.2.1 (64d14e85)

- What OS did you install modular CLI on ?

 Ubuntu 22.04.2 LTS
Arif812 commented 9 months ago

There might have been an installation error, try deleting the modular CLI and reinstalling it: apt-get install -y apt-transport-https && keyring_location=/usr/share/keyrings/modular-installer-archive-keyring.gpg && curl -1sLf 'https://dl.modular.com/bBNWiLZX5igwHXeu/installer/gpg.0E4925737A3895AD.key' | gpg --dearmor >> ${keyring_location} && curl -1sLf 'https://dl.modular.com/bBNWiLZX5igwHXeu/installer/config.deb.txt?distro=debian&codename=wheezy' > /etc/apt/sources.list.d/modular-installer.list && apt-get update && apt-get install -y modular Then download the package by using modular install mojo.

If you do not want to delete the modular CLI, then use modular uninstall mojo and use:

modular auth mut_XXXX && modular install mojo

jbulow commented 9 months ago

Tried both methods suggested. Still the same result.

River707 commented 9 months ago

Thanks for filing this! this file does not represent a loadable dylib is definitely a suspicious error, assuming that everything was installed correctly (which seems true from your comment), it looks as if it can't detect the location of the mojo repl shared library. We've change a bit the way that this is library is detected, could you please try again after the next upcoming release?

jbulow commented 9 months ago

Yes, I will try again after the next upcoming release.

jbulow commented 6 months ago

Still the same problem:

>  modular -v
modular 0.3.1 (589ce200)
>  mojo -v
mojo 0.6.0 (d55c0025)
>  mojo
error: this file does not represent a loadable dylib
error: couldn't find a REPL for mojo
jbulow commented 5 months ago

Turns out that this problem is directly related to #1503. If ld.so finds a liblldb.so other than the one provided in .modular/pkg/packages.modular.com_mojo/lib/liblldb.so it will result in the error reported in this issue.

Maybe update installation instruction of mojo to include a note about setting LD_LIBRARY_PATH to have the mojo directory first? Or even better: don't use the same name of the lldb included in mojo?

jbulow commented 5 months ago

Still broken in 0.7.0 release.