debian 13.0, downloaded yt-dlp with wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O ~/.local/bin/yt-dlp
the python script is in that directory, but if I execute yt-dlp on the terminal it returns bash: yt-dlp: command not found
what should I do?
SOLVED: add .local/bin to your $PATH
I’ll assume you’re new to Debian, so apologies if this is not true. The reason I say this is because generally speaking, “installing with wget” isn’t how one is supposed to install software in Debian, using a program called apt is. yt-dlp is available in Debian 13’s repositories. What I suggest doing is running
apt install yt-dlpas root. That way the app will be installed globally, meaning it’ll work without the system spitting out the error you’ve described. And on another positive note, the app will get updated automatically whenever you upgrade the system.If this isn’t for you, suggestions from other users here are valid and helpful.
Add
PATH="${PATH}:~/.local/bin"To your .zhrc or .bashrc (whatever you use) and either source the file or open a new terminal. Should be as simple as that (assuming +x permissions)
what you should do: delete that file and then listen to onlooker’s advice about using apt to install software when you can
what is happening: an arbitrary file you create to hold the contents of some data you streamed off the internet, for very good reason, is not automatically treated as an executable, partly because for all wget knows, it’s just a photograph or some text. to mark a file as executable, you need to run
chmod +x /path/to/script/fileto add to the file’s permissions. to learn more, and you should, please learn about file permissions and how those work on linux systems.Have you consulted the ‘README’ that is both in the yt-dlp directory as well as the github regarding installation?
um, isn’t it easier to just:
sudo apt install yt-dlp
yt-dlp -UThe people telling you to use apt are pointing you in the wrong direction. Usually it’s better to use apt but sometimes with software that updates very often for a good reason like yt-dlp you can end up with old nonfunctional versions. Apt versions of yt-dlp are often several steps behind the arms race and just fail to work in weird ways.
The person telling you to add .local/bin to your $PATH is the one you should be listening to. The program isn’t launching because when you type it in, the terminal only looks in the places defined in the environment variable $PATH to see if the thing you typed corresponds to a program.
Once you have added the install location to path, be sure to add -U to your invocations of yt-dlp especially if they’re running automatically. The -U flag causes yt-dlp to try to update itself before attempting to do whatever you asked so things will almost never fail because of an old version.
thank you. I did what you suggested
Hell yeah
Thanks @Mikelius@lemmy.ml
deleted by creator




