Linux – Not able to install youtube-dl

debianlinuxyoutube-dl

I have tried almost everything I could find on google but could not install youtube-dl on Debian Mint.

Try 1

Installed and updated with following commands:

sudo apt-get install youtube-dl 

sudo youtube-dl -U

But when tried

youtube-dl http://www.youtube.com/watch?v=dwYatpwrs8s

Then I got

Hi! We changed distribution method and now youtube-dl needs to update itself one more time.
This will only happen once. Simply press enter to go on. Sorry for the trouble!
From now on, get the binaries from http://rg3.github.io/youtube-dl/download.html, not from the git repository.

Then I went to http://rg3.github.io/youtube-dl/download.html and followed the installation instructions:

Try 2

sudo wget http://youtube-dl.org/downloads/2013.05.23/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+x /usr/local/bin/youtube-dl

Got the same error about the distribution change and new link.

Try 3

So I installed pip on my debian first and ran

sudo pip install --upgrade youtube_dl

But I am still getting same error and I have no idea what to do about it.

Best Solution

Just re-execute sudo youtube-dl -U and press Enter to update to the latest version. With your second try, you installed it a second time (to /usr/local/bin/ instead of /usr/bin) - you want only one.

Alternatively, simply uninstall youtube-dl with sudo apt-get remove -y youtube-dl. That should make the local version (/usr/local/bin/youtube-dl) the first one in your PATH again - if your PATH contains /usr/local/bin. If it doesn't, you can also just install youtube-dl to /usr/bin, with the following commands:

sudo wget https://yt-dl.org/latest/youtube-dl -O /usr/bin/youtube-dl
sudo chmod a+x /usr/bin/youtube-dl
Related Question