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

  • stupid_asshole69 [none/use name]@hexbear.net
    link
    fedilink
    English
    arrow-up
    2
    ·
    15 hours ago

    The 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.