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
pomsky
  • 68,507
gatorback
  • 5,785
  • 9
  • 40
  • 65
  • 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 04 '20 at 04: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 04 '20 at 04:18
  • Okay you're using 16.04 Xenial (https://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 04 '20 at 04:23
  • @guiverc 16.04 Can I update to 2020.01.01? Any feedback to advance the question is appreciated – gatorback Jan 04 '20 at 05: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: http://ytdl-org.github.io/youtube-dl/download.html – andrew.46 Jan 04 '20 at 06:29
  • @andrew.46 Success. If you would like to create an answer, then I can award you credit. – gatorback Jan 04 '20 at 06:43
  • @karel Uncertain: I tried andrew.46's solution and it was successful. Thank you for the suggestion. – gatorback Jan 04 '20 at 06:49
  • @gatorback Good to hear that the issue is resolved! However variations of this question appear in many places over AskUbuntu and there is a chance that this particular question could be a duplicate. As karel has suggested. Important thing is that your issue is resoved :) – andrew.46 Jan 04 '20 at 06:49
  • Unfortunately there is a dash to grab the latest version of youtube-dl from every other software source on the internet instead of getting the latest version of youtube-dl from the most secure source which is the youtube-dl snap package in the Ubuntu Software app. – karel Jan 04 '20 at 06:52
  • Yes, I suspect that I am not the first to post this problem. That being said karel's posting offers numerous solutions. I was wondering if the youtube-dl snap has any advantage over the `wget' method. – gatorback Jan 04 '20 at 06:54
  • Installing software from Ubuntu Software is generally recommended over all other software sources including PPAs, GitHub, warez websites, filesharing websites and the ridiculous cover disk that comes with Linux Format magazine which includes junk like abandonware and obsolete Gentoo iso files. – karel Jan 04 '20 at 07:05
  • @gatorback Good news is that it is your system so you do it whichever way you wish :). I have always downloaded youtube-dl directly from the developers' web site with no issues, and this over many years, but this may not be the best idea for all users. Updating is then the user's responsibility by routinely running youtube-dl -U . Mind you I am not exactly a mainstream Ubuntu user so perhaps karel's advice should be noted carefully :) – andrew.46 Jan 04 '20 at 08:55

1 Answers1

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
Kulfy
  • 17,696
Wiley
  • 469