New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating youtube-dl fails, claims success, odd result #3908

Closed
grauerkoala opened this Issue Oct 9, 2014 · 8 comments

Comments

Projects
None yet
7 participants
@grauerkoala

grauerkoala commented Oct 9, 2014

I have installed youtube-dl using apt-get on Debian Wheezy:
$ sudo apt-get install youtube-dl

The version is rather old (2012.02.27), so i decided to update it:

$ sudo youtube-dl --update
Updating to latest version...
Updated youtube-dl. Restart youtube-dl to use the new version.

Though it appears to have been a success, the result is this:

$ youtube-dl --version
/usr/bin/youtube-dl: line 1: Not: command not found

What's that?, I wondered. Turns out, the contents of /usr/bin/youtube-dl have been rendered rather useless during the update:

$ cat /usr/bin/youtube-dl
Not Found

I used to have a far more recent version of youtube-dl than that since I had updated it a few, well, months back (sadly I did not take note of what it actually was), so I'm fairly confident that this error exists in later versions than 2012.02.27.

@phihag

This comment has been minimized.

Show comment
Hide comment
@phihag

phihag Oct 9, 2014

Collaborator

Thank you for the report. I am sorry for the fault; we did not expect anyone to run versions of youtube-dl that have been broken since 2012.

Use the following commands to update:

sudo rm /usr/bin/youtube-dl  # or apt-get remove -y youtube-dl
sudo wget https://yt-dl.org/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+x /usr/local/bin/youtube-dl
hash -r
Collaborator

phihag commented Oct 9, 2014

Thank you for the report. I am sorry for the fault; we did not expect anyone to run versions of youtube-dl that have been broken since 2012.

Use the following commands to update:

sudo rm /usr/bin/youtube-dl  # or apt-get remove -y youtube-dl
sudo wget https://yt-dl.org/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+x /usr/local/bin/youtube-dl
hash -r

@phihag phihag closed this Oct 9, 2014

@grauerkoala

This comment has been minimized.

Show comment
Hide comment
@grauerkoala

grauerkoala Oct 18, 2014

(Sorry for the late reply)
I used these commands and as expected, it works fine. I was simply surprised by the fact that the latest package (unless I'm missing something) in the repos of Debian Wheezy -- which is currently considered "stable" -- is able to fail this badly at performing such an important feature.

While this is probably a matter of keeping the package up to date (though I'm familiar neither with the degree in which the maintainers are affiliated with the youtube-dl project nor with the policies that Debian has put in place regarding that), I figured, judging from what I had observed, that maybe a URL had changed that used to provide the latest version of youtube-dl, in which case this could have been considered as a suggestion on how to fix this rather bad behaviour.

So please don't take this as an offense. I like youtube-dl and I'd like to make sure that people that are new to it aren't going to be scared away by it breaking from trying to update it.

grauerkoala commented Oct 18, 2014

(Sorry for the late reply)
I used these commands and as expected, it works fine. I was simply surprised by the fact that the latest package (unless I'm missing something) in the repos of Debian Wheezy -- which is currently considered "stable" -- is able to fail this badly at performing such an important feature.

While this is probably a matter of keeping the package up to date (though I'm familiar neither with the degree in which the maintainers are affiliated with the youtube-dl project nor with the policies that Debian has put in place regarding that), I figured, judging from what I had observed, that maybe a URL had changed that used to provide the latest version of youtube-dl, in which case this could have been considered as a suggestion on how to fix this rather bad behaviour.

So please don't take this as an offense. I like youtube-dl and I'd like to make sure that people that are new to it aren't going to be scared away by it breaking from trying to update it.

@rajvanshipradeep15

This comment has been minimized.

Show comment
Hide comment
@rajvanshipradeep15

rajvanshipradeep15 Jan 24, 2015

Hello Phihag,

I have done the same as you have suggested but I get this error every time when I try to download,

youtube-dl http://youtu.be/Ds0qIpeEn3o
[youtube] Setting language
[youtube] Ds0qIpeEn3o: Downloading video webpage
[youtube] Ds0qIpeEn3o: Downloading video info webpage
[youtube] Ds0qIpeEn3o: Extracting video information
Traceback (most recent call last):
File "/usr/bin/youtube-dl", line 4645, in
main()
File "/usr/bin/youtube-dl", line 4636, in main
_real_main()
File "/usr/bin/youtube-dl", line 4620, in _real_main
retcode = fd.download(all_urls)
File "/usr/bin/youtube-dl", line 869, in download
ie.extract(url)
File "/usr/bin/youtube-dl", line 1135, in extract
return self._real_extract(url)
File "/usr/bin/youtube-dl", line 1406, in _real_extract
url_map = dict((ud['itag'][0], ud['url'][0] + '&signature=' + ud['sig'][0]) for ud in url_data)
File "/usr/bin/youtube-dl", line 1406, in
url_map = dict((ud['itag'][0], ud['url'][0] + '&signature=' + ud['sig'][0]) for ud in url_data)
KeyError: 'sig'

Please guide me to fix this error.

rajvanshipradeep15 commented Jan 24, 2015

Hello Phihag,

I have done the same as you have suggested but I get this error every time when I try to download,

youtube-dl http://youtu.be/Ds0qIpeEn3o
[youtube] Setting language
[youtube] Ds0qIpeEn3o: Downloading video webpage
[youtube] Ds0qIpeEn3o: Downloading video info webpage
[youtube] Ds0qIpeEn3o: Extracting video information
Traceback (most recent call last):
File "/usr/bin/youtube-dl", line 4645, in
main()
File "/usr/bin/youtube-dl", line 4636, in main
_real_main()
File "/usr/bin/youtube-dl", line 4620, in _real_main
retcode = fd.download(all_urls)
File "/usr/bin/youtube-dl", line 869, in download
ie.extract(url)
File "/usr/bin/youtube-dl", line 1135, in extract
return self._real_extract(url)
File "/usr/bin/youtube-dl", line 1406, in _real_extract
url_map = dict((ud['itag'][0], ud['url'][0] + '&signature=' + ud['sig'][0]) for ud in url_data)
File "/usr/bin/youtube-dl", line 1406, in
url_map = dict((ud['itag'][0], ud['url'][0] + '&signature=' + ud['sig'][0]) for ud in url_data)
KeyError: 'sig'

Please guide me to fix this error.

@phihag

This comment has been minimized.

Show comment
Hide comment
@phihag

phihag Jan 24, 2015

Collaborator

@rajvanshipradeep15 Your problem is completely unrelated to this one. Please open a new issue. Do not forget to consult our FAQ and our bug reporting guidelines before opening the issue.

Collaborator

phihag commented Jan 24, 2015

@rajvanshipradeep15 Your problem is completely unrelated to this one. Please open a new issue. Do not forget to consult our FAQ and our bug reporting guidelines before opening the issue.

@MrRKernelPanic

This comment has been minimized.

Show comment
Hide comment
@MrRKernelPanic

MrRKernelPanic Mar 19, 2015

Thank you so much, came across this fix when trying to run youtube-dl on a Raspberry Pi 2, worked like a charm and fixed the inability to download Vevo videos! Keep up the excellent work. :)

MrRKernelPanic commented Mar 19, 2015

Thank you so much, came across this fix when trying to run youtube-dl on a Raspberry Pi 2, worked like a charm and fixed the inability to download Vevo videos! Keep up the excellent work. :)

@xDinomode

This comment has been minimized.

Show comment
Hide comment
@xDinomode

xDinomode Jun 7, 2016

@phihag Just thought I'd let you know that I attempted to install following these instructions on the official website and had the same problem (for linux fedora 23). But following your instructions made it work.

xDinomode commented Jun 7, 2016

@phihag Just thought I'd let you know that I attempted to install following these instructions on the official website and had the same problem (for linux fedora 23). But following your instructions made it work.

@zick53

This comment has been minimized.

Show comment
Hide comment
@zick53

zick53 Jun 10, 2016

Latest youtube-dl
Error on OS X 10.11.5:
/usr/local/bin/youtube-dl: line 1: 302: command not found

zick53 commented Jun 10, 2016

Latest youtube-dl
Error on OS X 10.11.5:
/usr/local/bin/youtube-dl: line 1: 302: command not found

@yan12125

This comment has been minimized.

Show comment
Hide comment
@yan12125

yan12125 Jun 10, 2016

Collaborator

@zick53 Remove the existing /usr/local/bin/youtube-dl and re-download it. If you're using curl, an additional -L is necessary for the latest version. See https://github.com/rg3/youtube-dl#installation

Collaborator

yan12125 commented Jun 10, 2016

@zick53 Remove the existing /usr/local/bin/youtube-dl and re-download it. If you're using curl, an additional -L is necessary for the latest version. See https://github.com/rg3/youtube-dl#installation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment