Zulip Chat Archive

Stream: new members

Topic: installation on Fedora


mario (Feb 11 2022 at 14:14):

Hi All,
test. Do you see my message?

mario (Feb 11 2022 at 14:20):

Hi
lean newbie here.
I am trying to install and looking at the tutorial package -https://leanprover-community.github.io/install/project.html
I get

[mario@localhost lean]$ leanproject get tutorials
Cloning from git@github.com:leanprover-community/tutorials.git
The authenticity of host 'github.com (140.82.121.4)' can't be established.
ED25519 key fingerprint is SHA256:+........
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Error cloning via SSH, trying HTTPS...
Cloning from https://github.com/leanprover-community/tutorials.git
[Errno 2] No such file or directory: 'leanpkg'

which error is that?

mario (Feb 11 2022 at 14:21):

I am on a Fedora 35 machine

Julian Berman (Feb 11 2022 at 14:21):

Have you followed the installation instructions from here: https://leanprover-community.github.io/install/linux.html

Julian Berman (Feb 11 2022 at 14:22):

That error essentially means Lean (or elan) isn't installed, or isn't findable.

Notification Bot (Feb 11 2022 at 14:22):

This topic was moved here from #general > Test by Rob Lewis

Julian Berman (Feb 11 2022 at 14:22):

(The first part is unrelated and has something to do with your SSH setup, but is some separate issue that can be fixed after)

mario (Feb 11 2022 at 14:26):

Yes, I did. I tried VisualCode too, I create a test.lean, write #eval 1+2, and see 2.

Julian Berman (Feb 11 2022 at 14:32):

OK -- can you show us what type -a elan says?

mario (Feb 11 2022 at 14:37):

Julian Berman said:

OK -- can you show us what type -a elan says?

 type -a elan
elan is /home/mario/.elan/bin/elan
elan is /home/mario/.elan/bin/elan
elan is /home/mario/.elan/bin/elan

BUT, something I miss on my shell. Above on the tab I did PATH=$PATH:$HOME/.elan/bin. On the tab I launch leanproject get tutorials, i just get type -a elan > bash: type: elan: not found

Julian Berman (Feb 11 2022 at 14:38):

Is that the shell you first ran the installation instructions on? Can you restart your terminal and try leanproject get tutorials in a new one?

mario (Feb 11 2022 at 14:45):

My fault. I have two attempts of install, somehow mixed up. I clean my mess and try again. Thanks for now.

Reid Barton (Feb 11 2022 at 14:48):

Running a command like PATH=$PATH:$HOME/.elan/bin in a shell will only affect that shell (in your case, that tab).

Reid Barton (Feb 11 2022 at 14:49):

But the elan installation process should also have added this command to your shell's startup scripts, so it should work automatically in new shells.

mario (Feb 11 2022 at 21:37):

It seems it works fine now. Thanks.

jgart (Dec 30 2024 at 22:27):

Hi, has anyone had success with the lean installer in vscode on Fedora 41 Workstation?

Notification Bot (Dec 30 2024 at 22:28):

A message was moved here from #new members > Could someone help for proving this problem (identity 212)? by Eric Wieser.

jgart (Dec 30 2024 at 22:31):

The installer assumes that it can append into my ~/.profile but that is read-only.

Chris Bailey (Dec 30 2024 at 22:48):

I didn't have any issues, but I also have elan appended to my ~/.profile (I don't think I put it there).

jgart (Dec 30 2024 at 22:50):

Thanks for the feedback.

I know why my ~/.profile is read-only now. It's because of an immutable package manager that I am using for my home dotfiles (Guix which is like Nix).

Is it possible to have the elan write this configuration somewhere else?

jgart (Dec 30 2024 at 22:53):

Another interesting thing is that the installer checks that step green, signifying that it completed the step successfully when it actually failed to do so because of not being able to write to ~/.profile.

Chris Bailey (Dec 30 2024 at 22:56):

Does it require that to actually install everything else, or is that just part of the installation process? My first thought would be to just run the thing and put what it would have put in your profile wherever it needs to go in order for the PATH stuff to work. The string it writes is export PATH="$HOME/.elan/bin:$PATH"

jgart (Dec 30 2024 at 22:57):

This is what my ~/.profile contains:

$ cat .profile
HOME_ENVIRONMENT=$HOME/.guix-home
. $HOME_ENVIRONMENT/setup-environment
$HOME_ENVIRONMENT/on-first-login

jgart (Dec 30 2024 at 22:57):

But that ~/.profile is read-only.

Chris Bailey (Dec 30 2024 at 22:58):

If you've already run the installer, do you have a .elan folder?

jgart (Dec 30 2024 at 22:59):

Chris Bailey said:

My first thought would be to just run the thing and put what it would have put in your profile wherever it needs to go in order for the PATH stuff to work. The string it writes is export PATH="$HOME/.elan/bin:$PATH"

I was thinking that as well but I was also wondering where exactly it failed in that install step and what might it had failed to run after attempting to write the export command.

I'll have to read this install script source code closely. I haven't looked at that yet.

jgart (Dec 30 2024 at 23:00):

Chris Bailey said:

If you've already run the installer, do you have a .elan folder?

I do

$ ls .elan/bin/
elan  lake  lean  leanc  leanchecker  leanmake  leanpkg

jgart (Dec 30 2024 at 23:00):

Given the above, it sounds like I can just put that directory on PATH and proceed.

jgart (Dec 30 2024 at 23:02):

It sounds like maybe the installer should handle such a case in a less intrusive way. Maybe it could just suggest the user to add ~/.elan to PATH. If it wants to make that more user friendly it can print to standard output some ideas on how to do that instead of trying to write to ~/.profile on the user's behalf.

Julian Berman (Dec 30 2024 at 23:02):

--no-modify-path will tell the installer not to touch your system

Julian Berman (Dec 30 2024 at 23:02):

And then yes you simply append to your PATH however you like

jgart (Dec 30 2024 at 23:03):

--no-modify-path will tell the installer not to touch your system

TIL: Thanks.

jgart (Dec 30 2024 at 23:04):

I was also thinking that I might want to run the Lean installer in a toolbox or distrobox (podman container with access to host home) so that I don't modify my file system with various paths I'm not tracking or don't want to worry about how to clean up later.

jgart (Dec 30 2024 at 23:05):

Julian Berman said:

--no-modify-path will tell the installer not to touch your system

If I remember correctly, though, I migh have just clicked a button in vscode in order to start the process so not sure how I might have passed in that flag :duck:

jgart (Dec 30 2024 at 23:06):

I guess I should not follow the vscode GUI installation steps and find command line install steps instead :duck:

jgart (Dec 31 2024 at 00:12):

Looks like maybe this might have been the culprit. I'll try to reproduce the issue later and maybe report it:

https://github.com/leanprover/elan/blob/417e1abbd6e24781dde778e2d75d51361378f242/src/elan-cli/self_update.rs#L264

jgart (Dec 31 2024 at 00:12):

Thanks for the help with this. Much appreciated.


Last updated: May 02 2025 at 03:31 UTC