Issue 18808 - dmd not found after installation using script
Summary: dmd not found after installation using script
Status: RESOLVED WONTFIX
Alias: None
Product: D
Classification: Unclassified
Component: installer (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 critical
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-29 11:50 UTC by Lance Bachmeier
Modified: 2021-11-27 15:33 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Lance Bachmeier 2018-04-29 11:50:04 UTC
If I install using the script

curl -fsS https://dlang.org/install.sh | bash -s dmd

It gives the message

Run `source ~/dlang/dmd-2.079.1/activate` in your shell to use dmd-2.079.1.
This will setup PATH, LIBRARY_PATH, LD_LIBRARY_PATH, DMD, DC, and PS1.

That works until you close the current terminal. As soon as you use a new terminal, you get

Command 'dmd' not found

On Ubuntu 18.04. I put the severity at critical because the installation process needs to work.
Comment 1 Nemanja Boric 2018-06-01 17:29:36 UTC
Not sure if this is what you're looking for, but still - the usual process with `source`-ing some configuration is that it applies only to the current terminal. If you want it to work in other terminals, add that line to the `~/.bashrc` or `~/.zshrc`
Comment 2 Lance Bachmeier 2018-06-01 20:12:34 UTC
That is almost certainly correct. I guess the point is that we shouldn't call something an official install script if it doesn't do a proper installation. If the user has to manually run that command every time they use DMD, or figure out for themselves how to fix it, the installer isn't doing its job.
Comment 3 Vladimir Panteleev 2018-06-01 23:23:14 UTC
There is no single correct way to permanently change the system configuration so that dmd ends up in PATH on Linux / Posix, as that is the job of the distribution's package manager.

The actionable here is to improve the message to let them know that the effect is temporary, and they can add the line to their configuration if they want to make it permanent.
Comment 4 Lance Bachmeier 2021-11-27 15:33:45 UTC
I think this should be closed. There's no way to do what I wanted it to do when I created this.