modularml / mojo

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

[Modular CLI]: Can't install on arch linux #572

Open TheKaram opened 1 year ago

TheKaram commented 1 year ago

Issue description

I have received an email from Modular to download Mojo but the installation script supports only Fedora and Ubuntu.

Steps to reproduce

Run the installation script on arch linux.

Version Info

- Provide Modular CLI version by pasting the output of `modular -v`
- What OS did you install modular CLI on ?

I couldn't install it.
varasinguluri commented 10 months ago

@Sharktheone Nudge nudge :) Eagerly waiting. Thanks for your effort.

Sharktheone commented 10 months ago

Okay, finally did it... Uploaded it on the AUR now

david-ragazzi commented 10 months ago

@Sharktheone You are the man! 👏🏻👏🏻👏🏻

david-ragazzi commented 10 months ago

It's weird. The package "mojo" is not shown in pamac. Does anyone with same problem?

PS: The thidy party AUR support is enabled.

Sharktheone commented 10 months ago

hmm, pamac is the gui thing, right? I guess you need to update the repositories. Maybe it is easier to install it with yay or paru.

david-ragazzi commented 10 months ago

hmm, pamac is the gui thing, right? I guess you need to update the repositories. Maybe it is easier to install it with yay or paru.

Yes, it's the default package manager in Manjaro. I refreshed the databases but no success. I'm trying check the problem.

WebReflection commented 10 months ago

installed from pamac without issues ... raw ArchLinux (btw)

Screenshot from 2023-10-27 20-55-29

david-ragazzi commented 10 months ago

It's showing now. Maybe pamac take some hours to sincronize to AUR repository...

rkompass commented 8 months ago

Hello @Sharktheone ,

thank you for making install script for manjaro. I cannot install it though. It runs through the modular install, but then it complains that it does get a token at mojo install:

Vorbereitung...
Klone mojo Build-Dateien...
Generiere mojo Informationen...
Überprüfe mojo Abhängigkeiten...
Klone modular Build-Dateien...
Generiere modular Informationen...
Überprüfe modular Abhängigkeiten...
Klone mojo-git Build-Dateien...
Generiere mojo-git Informationen...
Überprüfe mojo-git Abhängigkeiten...
Abhängigkeiten werden aufgelöst...
Interne Konflikte werden überprüft...

Erstelle modular...
==> Erstelle Paket: modular 0.3.1-1 (Fr 29 Dez 2023 11:19:50 CET)
==> Prüfe Laufzeit-Abhängigkeiten...
==> Prüfe Buildtime-Abhängigkeiten...
==> Empfange Quellen...
  -> modular-v0.3.1-amd64.deb gefunden
==> Überprüfe source Dateien mit sha256sums...
    modular-v0.3.1-amd64.deb ... Erfolg
==> Entferne existierendes $srcdir/ Verzeichnis...
==> Entpacke Quellen...
  -> Entpacke modular-v0.3.1-amd64.deb mit bsdtar
==> Betrete fakeroot Umgebung...
==> Beginne package()...
==> Säubere Installation...
  -> Entferne libtool Dateien...
  -> Bereinige ungewollte Dateien...
  -> Entferne statische Bibliotheken...
  -> Entferne unnötige Symbole aus Binär-Dateien und Bibliotheken...
  -> Komprimiere Man-Pages und Info-Seiten...
==> Prüfe auf Paketierungsprobleme...
==> Erstelle Paket "modular"...
  -> Erstelle .PKGINFO Datei...
  -> Erstelle .BUILDINFO Datei...
  -> Füge install Datei hinzu...
  -> Erstelle .MTREE-Datei...
  -> Komprimiere Paket... 
==> Verlasse fakeroot Umgebung.
==> Beendete Erstellung: modular 0.3.1-1 (Fr 29 Dez 2023 11:19:52 CET)
==> Räume auf...

Überprüfe Schlüsselring...
Integrität wird überprüft...
Paketdateien werden geladen...
Dateikonflikte werden überprüft...
Überprüfe verfügbaren Speicherplatz...
Installiere modular (0.3.1-1)...

Erstelle mojo-git...
==> Erstelle Paket: mojo-git 0.6.0-5 (Fr 29 Dez 2023 11:19:53 CET)
==> Prüfe Laufzeit-Abhängigkeiten...
==> Prüfe Buildtime-Abhängigkeiten...
==> Empfange Quellen...
  -> install.py gefunden
==> Überprüfe source Dateien mit sha256sums...
    install.py ... Erfolg
==> Entferne existierendes $srcdir/ Verzeichnis...
==> Entpacke Quellen...
==> Entferne existierendes $pkgdir/ Verzeichnis...
==> Betrete fakeroot Umgebung...
==> Beginne package()...
Please enter your Modular auth token: Traceback (most recent call last):
  File "/var/tmp/pamac-build-raul/mojo-git/src/install.py", line 120, in <module>
    token = input("Please enter your Modular auth token: ")
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
EOFError: EOF when reading a line
==> FEHLER: Ein Fehler geschah in package().
    Breche ab...

My understanding of this so far is: A Modular auth token is needed which usually is automatically generated (and stored??) with manual modular install, but is not there with the automatic install.

What can I do?

rkompass commented 8 months ago

I solved it for myself as follows: I created an account at https://docs.modular.com. Following this it showed me how to proceed for an install. There were two instructions. After a curl instruction (iirc) the second instruction was something like modular auth mut_621dsj9we9nf9ejwienr9wjejriwerefn which I executed in a terminal. The modular package was installed of course already. Now a second attempt to install the mojo metapackage proceeded and I can compile hello.mojo and so on ...

To generalize this: Is there a way to give an error message or a regular message after the modular install to the manjaro user to register at https://docs.modular.com? This might help others.

Sharktheone commented 8 months ago

it complains that it does get a token at mojo install

that's probably because of the way the script got executed by your package manager (yay / paru). I need to take a look later. But thanks for the report!

s0undt3ch commented 7 months ago
❯ ~/.modular/pkg/packages.modular.com_mojo/bin/mojo
/home/vampas/.modular/pkg/packages.modular.com_mojo/bin/mojo-lldb: error while loading shared libraries: libpanel.so.6: cannot open shared object file: No such file or director

I'm actually on Manjaro... What's wrong here?

Sharktheone commented 7 months ago

I guess, you either have used the AUR package or my script to install mojo. The script requires you to restart the shell, to add mojo to the $PATH and it's libraries to the $LD_LIBRARY_PATH env variable.

fharsanto commented 6 months ago

Go some issue when using this command yay -S mojo-git

AUR Explicit (1): mojo-git-24.1.0-1
:: PKGBUILD up to date, skipping download: mojo-git
  1 mojo-git                                 (Installed) (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
  1 mojo-git                                 (Installed) (Build Files Exist)
# Found release for https://packages.modular.com/mojo @ 24.1.0-55ec12d6-release
# Downloading archive: packages/24.1.0-55ec12d6-release/mojo-x86_64-unknown-linux-gnu-24.1.0-55ec12d6-release.tar.gz
# Extracting downloaded archives.
# Extraction complete, setting configs...

[mojo][error] Mojo SDK post-install test "`mojo repl`" failed:
SubprocessError: Command '~/.modular/pkg/packages.modular.com_mojo/bin/mojo repl --one-line-before-file settings set target.load-cwd-lldbinit false --one-line-before-file settings set plugin.process.gdb-remote.packet-timeout 60' returned non-zero exit status 127.
  stderr:
    ~/.modular/pkg/packages.modular.com_mojo/bin/mojo-lldb: error while loading shared libraries: libpanel.so.6: cannot open shared object file: No such file or directory
  File "~/.modular/pkg/packages.modular.com_mojo/scripts/post-install/self-test.py", line 303, in test_mojo_repl
    raise SubprocessError(repl.returncode, " ".join(args), out, err)
[mojo][error] Some components of the Mojo SDK may have been installed successfully, but others may not work as expected.
[mojo][error] Please submit an issue to https://github.com/modularml/mojo and include the full output of the command you just ran.
modular: error: failed to run script

==========================
Failure Information:
    - Script: `PATH=~/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin HOME=/home/feridev PYTHONPATH=~/.modular/pkg/packages.modular.com_mojo/venv/lib~/.modular/pkg/packages.modular.com_mojo/venv/bin/python ~/.modular/pkg/packages.modular.com_mojo/scripts/post-install/self-test.py --modular-home ~/.modular --package-path ~/.modular/pkg/packages.modular.com_mojo --mojo-config-section mojo`
    - Result: 1
    - Stderr:
[mojo][error] Mojo SDK post-install test "`mojo repl`" failed:
SubprocessError: Command '~/.modular/pkg/packages.modular.com_mojo/bin/mojo repl --one-line-before-file settings set target.load-cwd-lldbinit false --one-line-before-file settings set plugin.process.gdb-remote.packet-timeout 60' returned non-zero exit status 127.
  stderr:
    ~/.modular/pkg/packages.modular.com_mojo/bin/mojo-lldb: error while loading shared libraries: libpanel.so.6: cannot open shared object file: No such file or directory
  File "~/.modular/pkg/packages.modular.com_mojo/scripts/post-install/self-test.py", line 303, in test_mojo_repl
    raise SubprocessError(repl.returncode, " ".join(args), out, err)
[mojo][error] Some components of the Mojo SDK may have been installed successfully, but others may not work as expected.
[mojo][error] Please submit an issue to https://github.com/modularml/mojo and include the full output of the command you just ran.
Sharktheone commented 6 months ago

Go some issue when using this command yay -S mojo-git

Yes, that's sadly "normal" on the first installation. The self-test script needs to execute mojo as a sub-process, and therefore mojo doesn't get the env overrides it needs.

When it's added to your bashrc / zshrc it should go away. On my PC I don't get the warning, however I got it in my test VM, maybe I can do some testing on how to properly fix this error.

btakita commented 4 months ago

Hi everyone. I'm trying to run:

modular install max

but get an error:

error while loading shared libraries: libpanel.so.6: cannot open shared object file: No such file or directory

Are there any existing workarounds to modular install max on arch? It seems like only max or mojo can be installed.

vincenzo-cuprous commented 2 months ago

same this problem while installing mojo.>>error while loading shared libraries: libpanel.so.6: cannot open shared object file: No such file or directory

Sharktheone commented 2 months ago

I've uploaded a package on the AUR, alternatively you can install it via my script here: https://github.com/Sharktheone/arch-mojo

I think it still wants a token from you, but that was removed, I need to update it soon™...