modularml / mojo

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

Cannot run Mojo REPL after successful installation #3711

Closed tahadnan closed 3 days ago

tahadnan commented 1 month ago

Bug description

While discovering Mojo, I tried to install it and use it, everything went well, until I ran this command:

cd testing-mojo && magic shell

followed by mojo command which returns this error

/home/tya/code_scripts/Mojo/testing-mojo/.magic/envs/default/bin/mojo-lldb: error while loading shared libraries: libedit.so.2: cannot open shared object file: No such file or directory

Steps to reproduce

Installed mojo following the official documentation then ran the following commands

magic init testing-mojo --format mojoproject
cd testing-mojo && magic shell
mojo

which returns

/home/tya/code_scripts/Mojo/testing-mojo/.magic/envs/default/bin/mojo-lldb: error while loading shared libraries: libedit.so.2: cannot open shared object file: No such file or directory

System information

- What OS did you do install Mojo on ?
EndeavourOS
- Provide version information for Mojo by pasting the output of `mojo -v`
mojo 24.5.0 (e8aacb95)
- Provide Magic CLI version by pasting the output of `magic -V` or `magic --version`
magic 0.4.0 - (based on pixi 0.33.0)
- Optionally, provide more information with `magic info`.
System
------------
      Pixi version: 0.33.0
          Platform: linux-64
  Virtual packages: __unix=0=0
                  : __linux=6.11.5=0
                  : __glibc=2.40=0
                  : __archspec=1=icelake
         Cache dir: /home/tya/.cache/rattler/cache
      Auth storage: /home/tya/.rattler/credentials.json
  Config locations: No config files found

Global
------------
           Bin dir: /home/tya/.modular/bin
   Environment dir: /home/tya/.modular/envs
      Manifest dir: /home/tya/.modular/manifests/pixi-global.toml

Project
------------
              Name: testing-mojo
           Version: 0.1.0
     Manifest file: /home/tya/code_scripts/Mojo/testing-mojo/mojoproject.toml
      Last updated: 25-10-2024 09:56:50

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

I'm also facing the same issue, how to rectify it?

tahadnan commented 3 weeks ago

I wish I knew it, the language is so interesting yet I can't run it.

Satheeshsk369 commented 4 days ago

Just a symbolic link will work after installing libedit

sudo ln -s /lib64/libedit.so.0 /lib64/libedit.so.2

now i can run the repl. but it also show some warning

❯ mojo
warning: (x86_64) /lib64/libm.so.6 No LZMA support found for reading .gnu_debugdata section
warning: (x86_64) /lib64/libdl.so.2 No LZMA support found for reading .gnu_debugdata section
warning: (x86_64) /lib64/librt.so.1 No LZMA support found for reading .gnu_debugdata section
warning: (x86_64) /home/satheeshkumar/Experiment/cgpu/.magic/envs/default/lib/libstdc++.so.6 unsupported DW_FORM value: 0x1e
Welcome to Mojo! 🔥

Expressions are delimited by a blank line.
Type `:quit` to exit the REPL and `:mojo help` for further assistance.

  1>  
tahadnan commented 3 days ago

Thanks for it, I recently switched to fedora I don't know of it will help, but didn't try yet. Thanks anyway.