26

Ubuntu 16.04: Verify latest youtube-dl version:

$ sudo apt-get install youtube-dl
youtube-dl is already the newest version (2016.02.22-1).
0 upgraded, 0 newly installed, 0 to remove and 137 not upgraded.

Why does video's URL fail?

$ youtube-dl -F  https://www.youtube.com/watch?v=ZFzSCJHp0lo
[youtube] ZFzSCJHp0lo: Downloading webpage
[youtube] ZFzSCJHp0lo: Downloading video info webpage
WARNING: Unable to extract video title
ERROR: This video is unavailable.

Python Version

$ readlink -f $(which python) | xargs -I % sh -c 'echo -n "%: "; % -V'
/usr/bin/python2.7: Python 2.7.12
12
  • 1
    The video is available and your version of youtube-dl at 2016.02.22-1 is badly out of date. Latest version is 2020.01.01.
    – andrew.46
    Jan 4 '20 at 4:12
  • What OS/release are you using? (You haven't stated, a bug report will get youtube-dl re-packaged, so you can file request - or provide details so others of us can) FYI: My Ubuntu packaged version is from 2019 not 2016
    – guiverc
    Jan 4 '20 at 4:18
  • Okay you're using 16.04 Xenial (packages.ubuntu.com/xenial/youtube-dl); it's a 'universe' package and thus no longer supported (if you use ubuntu-support-status --show-unsupported I bet you'll find it listed there) so it no longer gets updates. Only 'main' repository still gets updates for 16.04 being given 5 years of support; 'universe' had 3 years (why all flavors of 16.04 are now EOL). A bug can still be filed, but it may not be actioned anymore for xenial.
    – guiverc
    Jan 4 '20 at 4:23
  • @guiverc 16.04 Can I update to 2020.01.01? Any feedback to advance the question is appreciated
    – gatorback
    Jan 4 '20 at 5:52
  • @gatorback Update is easy although a few choices to be made. My own advice: 1. Remove the repository version: sudo apt-get remove youtube-dl 2. Download and install: sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl 3. Adjust permissions: sudo chmod a+rx /usr/local/bin/youtube-dl And then all should be well :) Other choices described here: ytdl-org.github.io/youtube-dl/download.html
    – andrew.46
    Jan 4 '20 at 6:29
36

See youtube-dl: Download Page.

To install it right away for all UNIX users (Linux, OS X, etc.), type:

sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl 

If you do not have curl, you can alternatively use a recent wget:

sudo wget http://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

You can also use pip:

sudo pip install --upgrade youtube_dl

The above steps will install latest version of youtube-dl that can be checked using youtube-dl --version. As of now the output of youtube-dl --version is:

2020.01.01
4
  • For Mac OS only, brew upgrade youtube-dl
    – Ivan Chau
    Mar 15 '20 at 9:29
  • Thats what solved my problem! Thanks.
    – JavaRunner
    Apr 3 '20 at 3:43
  • Maybe sometimes the player need download and install some pulgin like 'js player vflset'. In that case run: 'sudo youtube-dl [Option] [etc] ' In my case work! Apr 15 '20 at 10:58
  • Don't forget to change the permits of the file mp3 'sudo chown $USER yourFileName.mp3' Apr 15 '20 at 11:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.