Announcement

Collapse
No announcement yet.

youtube-dl not found

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    youtube-dl not found

    Hello everyone,

    I had to reinstall my kubuntu 16.04 recently and I try to get back everything I was using before. One thing I loved was youtube-dl.

    I followed the instruction there:
    https://github.com/rg3/youtube-dl/bl...README.md#bugs

    but it doesn't seem to have installed youtube-dl:
    Code:
    me:~/Music/Youtube_Songs$ sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                  Dload  Upload   Total   Spent    Left  Speed
    0     3    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
    0     3    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
    100   599    0   599    0     0    300      0 --:--:--  0:00:01 --:--:--  3103
    100 1592k  100 1592k    0     0  74975      0  0:00:21  0:00:21 --:--:--  107k
    me:~/Music/Youtube_Songs$ sudo chmod a+rx /usr/local/bin/youtube-dl
    me:~/Music/Youtube_Songs$ youtube-dl -x --audio-format mp3 -o "%(title)s.%(ext)s" "https://www.youtube.com/watch?v=vXyRJBuoPrQ"
    bash: /usr/bin/youtube-dl: No such file or directory
    Is it possible that there my PATH variable doesn't contain the right address to the directory where it was installed (/usr/local/bin/youtube-dl from what I see above). I have this impression:

    Code:
    me:~/Music/Youtube_Songs$ $PATH
    bash: /home/me/anaconda3/bin:/home/me/bin:/home/me/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin: No such file or directory
    Should I add the path to my PATH? How do I do it? And why is youtube-dl put in a directory where a priori linux doesn't look?

    Or should I move the directory containing the code of youtube-dl in another folder?

    Best
    Last edited by Robert24; Feb 25, 2018, 12:24 PM.

    #2
    Originally posted by Robert24 View Post
    Hello everyone,

    I had to reinstall my kubuntu 16.04 recently and I try to get back everything I was using before. One thing I loved was youtube-dl.

    I followed the instruction there:
    https://github.com/rg3/youtube-dl/bl...README.md#bugs

    but it doesn't seem to have installed youtube-dl:
    Code:
    me:~/Music/Youtube_Songs$ sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
    0     3    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
    0     3    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
    100   599    0   599    0     0    300      0 --:--:--  0:00:01 --:--:--  3103
    100 1592k  100 1592k    0     0  74975      0  0:00:21  0:00:21 --:--:--  107k
    me:~/Music/Youtube_Songs$ sudo chmod a+rx /usr/local/bin/youtube-dl
    me:~/Music/Youtube_Songs$ youtube-dl -x --audio-format mp3 -o "%(title)s.%(ext)s" "https://www.youtube.com/watch?v=vXyRJBuoPrQ"
    bash:[COLOR=#ff0000] /usr/bin/youtube-dl[/COLOR]: No such file or directory
    Is it possible that there my PATH variable doesn't contain the right address to the directory where it was installed (/usr/local/bin/youtube-dl from what I see above). I have this impression:

    Code:
    me:~/Music/Youtube_Songs$ $PATH
    bash: /home/me/anaconda3/bin:/home/me/bin:/home/me/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin: No such file or directory
    Should I add the path to my PATH? How do I do it? And why is youtube-dl put in a directory where a priori linux doesn't look?

    Or should I move the directory containing the code of youtube-dl in another folder?

    Best
    try this ,,,,,,,,
    Code:
    ls /usr/local/bin | grep youtube-dl
    dose this return "youtube-dl" if yes then it's installed ,,,,,,if not ,,,,do ,,,,,,
    Code:
    locate youtube-dl
    if this returns nothing then it's not installed .

    in your output's ubuve I see a anomaly ,,,I'v marked it in red ,,,,,,,IF youtube-dl is in /usr/local/bin/ then that last run was looking in the wrong place

    and all these places are in your $PATH

    VINNY
    i7 4core HT 8MB L3 2.9GHz
    16GB RAM
    Nvidia GTX 860M 4GB RAM 1152 cuda cores

    Comment


      #3
      There's something not right there. I suspect there is or was a dead link in /usr/bin, and bash is remembering that in its hash table. That would give the output you've given us. In bash you could try
      Code:
      ls -l /usr/bin/youtuble-dl
      hash
      hash -r
      The ls might not show anything, I've just tried it and deleting the /usr/bin entry still didn't persuade bash to check $PATH again. hash will show if my suspicion is correct, and hash -r will fix it.
      Regards, John Little

      Comment


        #4
        Thank you to both of you for your answer!

        @vinnywright youtube-dl seems to be installed:
        Code:
        me:~$ ls /usr/local/bin | grep youtube-dl
        youtube-dl
        so what should I do? I guess I need to change this PATH variable right? Or is it better to put youtube-dl in another directory (for now it is in /usr/local/bin/youtube-dl)?

        @jittle I entered your commands and got the following output:
        Code:
        me:~$ ls -l /usr/bin/youtuble-dl
        ls: cannot access '/usr/bin/youtuble-dl': No such file or directory
        me:~$ hash
        hits    command
          1    /bin/ls
        me:~$ hash -r
        (there was no output for the last command)

        Any advice?

        Comment


          #5
          Thanks @jlittle for the hash -r bit!

          @Robert24, here's some reading about it: https://unix.stackexchange.com/quest...-documentation

          And
          Code:
          locate youtube-dl | grep -v cache
          should confirm that youtube-dl is where it's supposed to be and that's in /usr/local/bin.

          If the locate command comes up blank, run sudo updatedb to refresh the database.

          BTW,

          what does apt policy youtube-dl show? If you've installed something like mpv from the standard repos, it pulls in an ancient version of youtube-dl which I purge before installing the github version.
          Last edited by chimak111; Feb 26, 2018, 06:24 AM.
          Kubuntu 20.04

          Comment


            #6
            Thank you for your answer chimak111,

            Here is the output of the locate command:

            Code:
            me:~$ locate youtube-dl | grep -v cache
            /home/me/anaconda3/envs/my_python35/bin/youtube-dl
            /home/me/anaconda3/envs/my_python35/etc/bash_completion.d/youtube-dl.bash-completion
            /home/me/anaconda3/envs/my_python35/etc/fish/completions/youtube-dl.fish
            /home/me/anaconda3/envs/my_python35/share/man/man1/youtube-dl.1
            /usr/local/bin/youtube-dl
            I guess I installed youtube dl when one of my conda environment was active (in the past) and then reinstalled it later. But I'm pretty sure I wasn't using this my_python35 before when I was using youtube-dl (before I reinstalled kubuntu), and as I don't need this environment anymore I think I will erase it. Unless you think it might be related to my problem.

            Any further suggestions?

            Comment


              #7
              Sorry, I can't say for sure but having an executable in two locations maybe part of the issue. I'm guessing that getting rid of the anaconda one should solve your problems.
              Kubuntu 20.04

              Comment


                #8
                You could try installing qmplay2, that installs youtube-dl as part of it.

                Comment


                  #9
                  I removed the anaconda environment my_python35 and now youtube-dl is working!

                  You're really amazing guys! You make my life better!

                  Comment


                    #10
                    Originally posted by Robert24 View Post
                    I removed the anaconda environment my_python35 and now youtube-dl is working!
                    That's peachy.

                    I find the $PATH variable hard to read, and easy to miss obscure entries. I've been confused by it often over the years. So, now I use an alias, defined in my .bashrc in my home directory:
                    Code:
                    $ echo $PATH
                    /home/john/bin::/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
                    $ alias path='echo -e ${PATH//:/\\n}'
                    $ path
                    /home/john/bin
                    
                    /usr/local/sbin
                    /usr/local/bin
                    /usr/sbin
                    /usr/bin
                    /sbin
                    /bin
                    /usr/games
                    /usr/local/games
                    /snap/bin
                    (The blank entry means the current working directory, frowned on as insecure for sysadmins.)
                    Regards, John Little

                    Comment

                    Working...
                    X