3

I was trying to download a video from YouTube using youtube-dl, but I got the sig error, so I tried to update youtube-dl to the latest version and it wasn't working. I'm sorry, I don't remember what the error was or what it said in the terminal when I tried to update. So I tried uninstalling and then reinstalling youtube-dl. The uninstalling part worked fine, it's the installing part that I need help with now.

I tried typing sudo apt-get install youtube-dl and I get this:

Reading package lists... Done  
Building dependency tree       
Reading state information... Done  
youtube-dl is already the newest version.  
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.  

So, I assumed that that meant that I had it installed, but when I tried to use it, nothing happens, or rather I just get this:

root@chaaaaaaarlie3:~# youtube-dl https://www.youtube.com/watch?v=eISomx-VMow
root@chaaaaaaarlie3:~#

and the video obviously doesn't download.

I have been trying to fix this problem for a while now and I have no idea what to do. I also have almost no knowledge of how to use terminals/Ubuntu/computers/things of that sort, so if you could be very specific when helping me, I'd appreciate it. (Okay, I'm not COMPLETELY stupid, but I really don't know much. Let's just say that youtube-dl is the ONLY thing that I use the terminal for >.> )

I'm not sure if this would be what's messing up my attempts to use youtube-dl, but I think I uninstalled youtube-dl and it's dependencies and I may have purged my local/config files for youtube-dl too. I can't really remember all that I did last night when I was trying to fix this...

karel
  • 122,292
  • 133
  • 301
  • 332

3 Answers3

4

You don't have to upgrade the system. Update youtube-dl by adding this PPA:

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

Then you may download any video as usual. For example:

youtube-dl https://www.youtube.com/watch?v=Ix1rD4JD3eo
David Foerster
  • 36,890
  • 56
  • 97
  • 151
Sathyam
  • 243
4

Possibly the easiest way to install and setup youtube-dl is to use the following two commands suggested by the youtube-dl developers:

sudo wget https://yt-dl.org/downloads/2015.04.09/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+x /usr/local/bin/youtube-dl

And to subsequently update youtube-dl simply run the following:

sudo youtube-dl --update

Best to update at regular intervals as youtube-dl is updated often to match changes at the You Tube end...

andrew.46
  • 39,359
2

You are using Ubuntu 12.10 which is an End of Life release. I know this from your terminal output about Setting up 2014.06.02-1~webupd8~quantal from this PPA: ppa:nilarimogard/webupd8 which is found at this webpage. That's why you can't update youtube-dl. Your version of youtube-dl is out of date and Google has changed the code required to download a YouTube video since Ubuntu 12.10 was released. That is why you can't download any video. Try installing the latest version of Ubuntu, Ubuntu 14.04, which is a Long Term Support release that is supported by updates until April, 2019, and youtube-dl will work the way it's supposed to.

Then try to download a 5-second test video to check if youtube-dl is working:

youtube-dl -f 18 http://www.youtube.com/watch?v=pBPPLu2x3lI  

If that doesn't work the apt version of YouTube is not up-to-date, so install the youtube-dl snap package instead:

sudo apt install snapd  
sudo snap install youtube-dl # start with snap run youtube-dl 
karel
  • 122,292
  • 133
  • 301
  • 332