Skip to content
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

Issue running youtube-dl on centos #1265

Closed
nblx2k4 opened this issue Aug 18, 2013 · 2 comments
Closed

Issue running youtube-dl on centos #1265

nblx2k4 opened this issue Aug 18, 2013 · 2 comments

Comments

@nblx2k4
Copy link

@nblx2k4 nblx2k4 commented Aug 18, 2013

Hey--

after following the install steps on http://rg3.github.io/youtube-dl/download.html, I've got this issue on my centos linux vps.

Error details:

[root@uhndjwwk tmp]# sudo wget http://youtube-dl.org/downloads/2013.02.02/youtube-dl -O /usr/local/bin/youtube-dl
--01:06:39-- http://youtube-dl.org/downloads/2013.02.02/youtube-dl
Resolving youtube-dl.org... 95.143.172.170, 2001:1a50:11:0:5f:8f:acaa:177
Connecting to youtube-dl.org|95.143.172.170|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 58757 (57K) [application/octet-stream]
Saving to: `/usr/local/bin/youtube-dl'

100%[=======================================>] 58,757 276K/s in 0.2s

01:06:39 (276 KB/s) - `/usr/local/bin/youtube-dl' saved [58757/58757]

[root@uhndjwwk tmp]# sudo chmod a+x /usr/local/bin/youtube-dl
[root@uhndjwwk tmp]# youtube-dl -o "/tmp/%(id)s%.%(ext)s%" http://www.youtube.com/watch?v=hmzL417Qm7E
sys:1: DeprecationWarning: Non-ASCII character '\xba' in file /usr/local/bin/youtube-dl on line 3, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
File "/usr/local/bin/youtube-dl", line 2
PK▒4P▒▒▒5k▒▒Iث▒▒▒H▒6▒>▒YU]▒▒!▒6▒&(▒e▒▒vڌ▒2▒▒%K%j▒֜▒▒7eԲ벺e+▒
▒▒|1)
^
SyntaxError: invalid syntax

Thanks,

@phihag
Copy link
Contributor

@phihag phihag commented Aug 18, 2013

It looks your version of Python is outdated. What output do you get for python --version?

youtube-dl requires Python 2.6, 2.7, 3.3 or newer. Is there any way that you can install a somewhat recent Python? If so, you could try the following (say, if you've got Python 2.6 installed):

sudo mv /usr/local/bin/youtube-dl /usr/local/bin/_youtube-dl.real
/bin/echo -e '#!/bin/sh\nexec python2.6 /usr/local/bin/_youtube-dl.real "$@"' | \
  sudo tee /usr/local/bin/youtube-dl >/dev/null
sudo chmod a+x /usr/local/bin/youtube-dl

That will create a helper script which launches youtube-dl with Python 2.6.

@nblx2k4
Copy link
Author

@nblx2k4 nblx2k4 commented Aug 19, 2013

Hey Phil--

I had no time to figure out the issue, however I could run it on a ubuntu VPS. Thanks for your reply!

@dstftw dstftw closed this May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.