Zulip Chat Archive
Stream: lean4
Topic: Failing to install elan
Frédéric Dupuis (May 21 2025 at 18:18):
I have just bought a new laptop (yay!), and I'm trying to set up Lean on it, and the elan installation script doesn't work for some reason. Here's what I'm getting from elan-init.sh (I get the same thing when running it in VSCode like in the instructions):
Welcome to Lean!
This will download and install Elan, a tool for managing different Lean
versions used in packages you create or download. It will also install a
default version of Lean and its package manager, lake, for editing files not
belonging to any package.
It will add the lake, lean, and elan commands to Elan's bin directory, located
at:
/home/fred/.elan/bin
This path will then be added to your PATH environment variable by modifying the
profile files located at:
/home/fred/.profile
/home/fred/.zprofile
/home/fred/.bash_profile
You can uninstall at any time with elan self uninstall and these changes will
be reverted.
Current installation options:
default toolchain: stable
modify PATH variable: yes
1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
error: error during download
info: caused by: [6] Could not resolve hostname (Could not resolve host: release.lean-lang.org)
My internet connection is working, and I can in fact reach release.lean-lang.org in my browser. I have both curl and git installed. Any idea what's going on?
Julian Berman (May 21 2025 at 20:17):
What does curl -v https://release.lean-lang.org show?
Frédéric Dupuis (May 21 2025 at 20:30):
A massive json file with all previous releases.
Julian Berman (May 21 2025 at 20:35):
OK that's .. a good sign clearly.
Julian Berman (May 21 2025 at 20:37):
Ah, that error comes from rust (calling out to libcurl), not curl (the binary) -- so somehow the former isn't working and the latter is. I'm not sure offhand why that'd be -- perhaps a step is to compare the output of ldd $(which curl) and ldd $(which elan) and see which libcurls they're using.
Frédéric Dupuis (May 21 2025 at 21:17):
The elan-init executable that gets run by the script is statically linked according to ldd, so presumably my version of libcurl shouldn't matter...?
Last updated: Dec 20 2025 at 21:32 UTC