Hacker News new | ask | show | jobs
by the__alchemist 52 days ago
Exactly. It's annoying if I'm just trying to launch an application I installed by typing its name, which is IMO what PATH is for.
2 comments

How are you installing it? Normally package managers will symlink it into a system defined $PATH directory so you shouldn’t need to faff with $PATH yourself.

Not all applications executable match the application name (eg Visual Studio Code is just “code”). So could that have been the issue?

Depends on the software. Generally, whatever the official installation instructions are.

> So could that have been the issue?

No. Adding things to the path is a reasonably common operation on all OSes and CLI-based software. Sometimes the installer will handle it for you; sometimes it won't. (This may be out of date, but I believe the Rust install script is an example of one that sets it up; Go is one that doesn't, and its official instructions CAO 6 months ago were to use Export, which doesn't work once you reboot)

go install isn’t really an installer. Frankly I don’t really see the point of even having that option.

More broadly speaking, you shouldn’t really be relying on your compiler to do the install. That was never the intended behaviour of a compiler. Which is why history you’d find the install options in the build scripts (eg makefile).

I was referring to installing the Go compiler - as an arbitrary example of an application you want to be able to launch from CLI, but that doesn't set it up for you. (And instructs (Or did) you to use export.
That’s because go is normally installed via package managers. If you want to install it manually then you need to define the environment manually so that it doesn’t conflict with any system-installed version that might depend on a particular behaviour of the one bundled with the package manager.

Distro maintainers test dependencies across all these different pieces of software, but they cannot test against people randomly installing their own versions of software. So it would be negligent for the Go team to advocate overwriting the distro-tested version of Go

https://go.dev/doc/install

Installing arbitrary software, including through the creator's official instructions, is a core capability of a GPOS.

> people randomly installing their own versions of software.

There are 2 things to unpack: Why you are referring to an official release as "randomly installing my own version", and that installing arbitrary software isn't a core component of a GPOS. Further, what does a call-to-only-use-package-managers (Or did I misunderstand you? That's how I'm reading it) has to do with the PATH on linux being terminal-specific?

this is why you don't curl | bash