Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Installation.md #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Doctor-Slop
Copy link

Added a command for installing to /bin/ in linux with curl, its just what worked for me. idk if its just a debian thing but /.local/bin/ isnt a thing on linux afaik, so i relpaced that directory with /bin/, witch is the correct directory in my case.

Added a command for installing to /bin/ in linux with curl, its just what worked for me. idk if its just a debian thing but /.local/bin/ isnt a thing on linux afaik, so i relpaced that directory  with /bin/, witch is the correct directory in my case.
@bashonly
Copy link
Member

On almost every *nix, manually installing to /bin or /usr/bin is discouraged/not supported since it can interfere with the system package manager. That's what /usr/local/bin is for -- but we actually changed this section to use ~/.local/bin instead of /usr/local/bin due to the self-updater (which would require root in /usr/local/bin).

@Doctor-Slop
Copy link
Author

On debian ~/.local/bin doesn't exist by default, so should we just mkdir ~/.local/bin and add to $PATH?

@bashonly
Copy link
Member

It's an ubuntu thing afaik

we already preface that section with this:

In UNIX-like OSes (MacOS, Linux, BSD), you can also install the application into a location in your $PATH, such as ~/.local/bin, in one of the following ways:

@Doctor-Slop
Copy link
Author

ok, on debian and fedora ~/.local/bin isn't a directory by default. I created ~/.local/bin and added export PATH=$PATH:~/.local/bin to the end of ~/.bashrc and that seems to work well. Unless you can suggest a location in $PATH that already exists (and if you can support it) then that would be wonderful (I don't think having to make and add a directory into your $PATH is desirable)

@bashonly
Copy link
Member

bashonly commented Mar 14, 2024

The only directories that are (almost) guaranteed to be in the user's PATH are /usr/bin and /usr/local/bin. But as mentioned above, having to run yt-dlp as root to update is a dealbreaker for those.

Adding ~/bin or ~/.local/bin to your PATH is not that taxing and it is basically a rite of passage for *nix users. We could add a mkdir -p ~/.local/bin line to the command line examples, but IMO it's not really necessary (and it would actually conflict with the preface that you should install yt-dlp in a directory that is already in your PATH).

I think maybe adding an FAQ entry on PATH could be useful, and we could link to it from the Installation page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants