modularml / mojo

The Mojo Programming Language
https://docs.modular.com/mojo/manual/
Other
23.34k stars 2.6k forks source link

[BUG] Failed to start the Kernel. OSError: libedit.so.2: cannot open shared object file: No such file or directory. View Jupyter log for further details. #3696

Open Jamie-Cas opened 1 month ago

Jamie-Cas commented 1 month ago

Bug description

I'm getting the following error: Failed to start the Kernel. OSError: libedit.so.2: cannot open shared object file: No such file or directory. View Jupyter log for further details.

This occurs when trying to execute mojo code in a .ipynb file inside of vscode. These are the terminal commands I have executed before the opening of vscode:

usr@fedora:~/code/mojo/test$ magic init mojo --format mojoproject
✔ Created /home/usr/code/mojo/test/mojo/mojoproject.toml
✔ Added max >=24.5.0,<25
usr@fedora:~/code/mojo/test$ cd mojo
usr@fedora:~/code/mojo/test/mojo$ magic shell
 . "/tmp/pixi_env_7Qa.sh"
usr@fedora:~/code/mojo/test/mojo$  . "/tmp/pixi_env_7Qa.sh"
(mojo) usr@fedora:~/code/mojo/test/mojo$ mojo --version
mojo 24.5.0 (e8aacb95)
(mojo) usr@fedora:~/code/mojo/test/mojo$ code .
(mojo) usr@fedora:~/code/mojo/test/mojo$ magic --version
magic 0.3.1 - (based on pixi 0.29.0)

after this, in vscode i made a file called learn.ipynb in vscode (I have the mojo extension and jupyter notebook extensions installed) and after selecting the mojo kernel when trying to run any code, the error message appears. image

Steps to reproduce

See above

System information

- What OS did you do install Mojo on ?
-> Fedora: Linux
- Provide version information for Mojo by pasting the output of `mojo -v`
See above
- Provide Magic CLI version by pasting the output of `magic -V` or `magic --version` 
See above
- Optionally, provide more information with `magic info`.
->
      Pixi version: 0.29.0
          Platform: linux-64
  Virtual packages: __unix=0=0
                  : __linux=6.8.5=0
                  : __glibc=2.39=0
                  : __archspec=1=zen2
         Cache dir: /home/jamiecasander/.cache/rattler/cache
      Auth storage: /home/jamiecasander/.rattler/credentials.json
  Config locations: No config files found

Project
------------
              Name: mojo
           Version: 0.1.0
     Manifest file: /home/jamiecasander/code/mojo/test/mojo/mojoproject.toml
      Last updated: 19-10-2024 15:20:52

Environments
------------
       Environment: default
          Features: default
          Channels: conda-forge, https://conda.modular.com/max
  Dependency count: 1
      Dependencies: max
  Target platforms: linux-64
ematejska commented 6 days ago

@walter I know lots has changed here in the past month. Is this still an issue?

Mogball commented 5 days ago

This sounds like it could be a dependency issue on Fedora. Maybe magic is missing a dep?

walter commented 5 days ago

@walter I know lots has changed here in the past month. Is this still an issue?

Probably not the Walter you are after. Unsubscribing to thread.

walter-erquinigo commented 5 days ago

@ematejska , notebooks rely on LLDB, which have a dependency on libedit.so.2 being available on the system. This is similar to https://github.com/modularml/mojo/issues/855 Maybe Zac can figure out how to specify that dependency in the proper way

teleporterx commented 1 day ago

https://github.com/modularml/mojo/issues/3629#issuecomment-2495578802 worked for me to get MOJO-REPL. I just symlinked libedit.so.2 and exported LD_LIBRARY_PATH. But this is just a temporary workaround and would need to be fixed in the future.

walter-erquinigo commented 5 hours ago

@teleporterx , do you know where your system has libedit.so.2 by default? We might be able to just add that location to the RPATH of our builds.