71

I use youtube-dl to download videos for watching later offline. Usually, it works fine. However, due to frequent changes on the video sites, it sometimes requires a quick update. It wasn't a problem before on 13.04 but after upgrading to 13.10, I get

# youtube-dl -U
It looks like you installed youtube-dl with a package manager, pip, setup.py or a tarball. Please use that to update.

I tried updating it via apt-get but there is no new package. So the app's update mechanism has been disabled and the maintainers aren't keeping up, what is the solution? How do I update it?

And why was it changed at all? It was updating a package manager version just fine in raring.

I'm already running into compatibility problems.

$ youtube-dl "http://vimeo.com/55784152"
[vimeo] 55784152: Downloading webpage
[vimeo] 55784152: Extracting information
ERROR: Unable to extract info section; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.

QUICK UPDATE:

As requested,

# type youtube-dl
youtube-dl is hashed (/usr/bin/youtube-dl)

# apt-cache policy youtube-dl
youtube-dl:
  Installed: 2013.08.29-1
  Candidate: 2013.08.29-1
  Version table:
 *** 2013.08.29-1 0
        500 http://pl.archive.ubuntu.com/ubuntu/ saucy/universe amd64 Packages
        100 /var/lib/dpkg/status
  • What is the output of type youtube-dl? And apt-cache policy youtube-dl. – Braiam Nov 22 '13 at 14:14
  • I added the outputs to the question. It should be all standard. – Damn Terminal Nov 22 '13 at 17:29
88

Try:

pip install --upgrade youtube-dl

Note: this assumes you have pip installed. Avoid using sudo pip (use virtualenv instead).

Using pip is a way to install youtube-dl, as reported on the official youtube-dl website, and the --upgrade option makes sure you end up with the latest available version installed.

To find out where youtube-dl has been installed, you can use the pip show youtube-dl command (see here and here).

  • 5
    thats awesomev it worked perfectly – ujwal dhakal Oct 12 '15 at 12:21
35

On 13.10, I installed youtube-dl from: http://rg3.github.io/youtube-dl/download.html because youtube-dl installed via sudo apt-get install didn't seem to allow sudo youtube-dl -U.

To get youtube-dl from source:

wget -O - https://yt-dl.org/downloads/latest/youtube-dl | sudo tee /usr/local/bin/youtube-dl >/dev/null
sudo chmod a+x /usr/local/bin/youtube-dl

Now, sudo youtube-dl -U works without problems and I currently see:

$ youtube-dl --version
2015.02.23
  • Yeah, I ended up sticking the binary from their website in ~/bin. It works and will probably update itself fine (even without sudo/root) but I can't say that this is a satisfying solution. – Damn Terminal Nov 21 '13 at 18:03
  • Well, if you come up with a better solution, please share it. – user25656 Nov 21 '13 at 18:40
  • And since you find the solution unsatisfactory, I'm quite willing to delete the answer if you specifically say so. – user25656 Nov 21 '13 at 18:47
  • No, no. I upvoted it, it's a good answer given the circumstances. – Damn Terminal Nov 21 '13 at 19:58
13

Try ppa:nilarimogard/webupd8. I do get upgrades every couple of days and I think, according to the message You get, that it should solve/answer Your question. If You did an upgrade from 13.04 to 13.10 You might have forgot (I guess) to update sources-list.d folder, for example, if You used WebUpd8 before.

sudo apt-add-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install youtube-dl
2

try the following:

sudo apt-get install python-setuptools
sudo easy_install pip
sudo pip install --upgrade youtube-dl

then if you still get an error do this:

wget -O - https://yt-dl.org/downloads/latest/youtube-dl | sudo tee /usr/local/bin/youtube-dl >/dev/null
sudo chmod a+x /usr/local/bin/youtube-dl
1

I had a similar problem with youtube-dl.

Using super user privileges in order to update it might solve your problem:

sudo youtube-dl -U
  • 2
    I'm running it as root. Note the # prompt. – Damn Terminal Nov 21 '13 at 16:57
  • Sorry, it was not apparent to me. – hytromo Nov 21 '13 at 17:04
1

Ubuntu 14.04 and later

The youtube-dl snap package (youtube-dl) is updated automatically in all currently supported versions of Ubuntu. To install it open the terminal and type:

sudo snap install youtube-dl # start with snap run youtube-dl 

Gydl (Graphical Youtube-dl) is a GUI wrapper around the already existing youtube-dl program. To install Gydl in all currently supported versions of Ubuntu open the terminal and type:

sudo snap install gydl
0

To get the latest youtube-dl one can install GetDeb repository. For details about installing in Ubuntu 16.04 LTS, see here.

To get the difference between getdeb and official Ubuntu versions of youtube-dl, consider this output (as of 23.09.2016):

$ apt-cache policy youtube-dl
youtube-dl:
  Installed: 1:2016.09.19-1~getdeb1
  Candidate: 1:2016.09.19-1~getdeb1
  Version table:
 *** 1:2016.09.19-1~getdeb1 500
       500 http://archive.getdeb.net/ubuntu xenial-getdeb/apps amd64 Packages
       500 http://archive.getdeb.net/ubuntu xenial-getdeb/apps i386 Packages
       100 /var/lib/dpkg/status
     2016.02.22-1 500
       500 http://ubuntu.mirror.lrz.de/ubuntu xenial/universe amd64 Packages
       500 http://ubuntu.mirror.lrz.de/ubuntu xenial/universe i386 Packages

In above output, 2016.09.19-1 shows getdeb version and 2016.02.22-1 shows official Ubuntu version.

0

As of 2017-11-11, if you are using Ubuntu, it seems that precise and trusty have too old versions of youtube-dl .

However, using the version from Xenial works. Otherwise, I'd suggest to install the latest version manually, as suggested in other answers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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