Help for CentOS & Redhat Folks #83

Closed
opened 2026-02-20 21:01:56 -05:00 by deekerman · 3 comments
Owner

Originally created by @ZiaMM on GitHub (Apr 17, 2011).

Authors: Please check if I did this workaround right - it seems to work.
Also, thanks for updating this program frequently to keep it working - you rock.

CentOS/Redhat only support Python 2.4 pending CentOS 6 but the latest version of youtube-dl requires Python 2.5. I think this is the workaround.

Here ...
http://blog.bashton.com/2008/python-25-rpms-for-rhel-5-centos-5/
... you will find Python 2.5 rpms which can be installed in parallel with your existing 2.4. Yum and other programs dependent on Python 2.4 will not be broken by installing them.

Step 1.
wget these:
http://bashton.com/downloads/rpm/python/python25-2.5.1-bashton1.x86_64.rpm
http://bashton.com/downloads/rpm/python/python25-libs-2.5.1-bashton1.x86_64.rpm

Step 2
Now install them concurrently (to avoid dependency problems 'cause each needs the other) like this:
rpm -ivh python25-libs-2.5.1-bashton1.x86_64.rpm python25-2.5.1-bashton1.x86_64.rpm

Step 3
Now change the first line in the youtube.dl script (/usr/bin/youtube-dl) to this:

!/usr/bin/env python25

That did it for me - the videos download again now. If I change the first line back to the old way (without '25' after python), it errors out as before.

This is not my forte, so if I just got lucky and there is a better way to do this, please advise. If you give me the OK, I'll post this workaround in a couple centos groups so folks can find it; you can link the FAQ to one of those or just paste this in.

The error before these changes was:
Traceback (most recent call last):
File "/usr/bin/youtube-dl", line 12, in ?
import ctypes
ImportError: No module named ctypes

Originally created by @ZiaMM on GitHub (Apr 17, 2011). Authors: Please check if I did this workaround right - it seems to work. Also, thanks for updating this program frequently to keep it working - you rock. CentOS/Redhat only support Python 2.4 pending CentOS 6 but the latest version of youtube-dl requires Python 2.5. I think this is the workaround. Here ... http://blog.bashton.com/2008/python-25-rpms-for-rhel-5-centos-5/ ... you will find Python 2.5 rpms which can be installed in parallel with your existing 2.4. Yum and other programs dependent on Python 2.4 will not be broken by installing them. Step 1. wget these: http://bashton.com/downloads/rpm/python/python25-2.5.1-bashton1.x86_64.rpm http://bashton.com/downloads/rpm/python/python25-libs-2.5.1-bashton1.x86_64.rpm Step 2 Now install them concurrently (to avoid dependency problems 'cause each needs the other) like this: rpm -ivh python25-libs-2.5.1-bashton1.x86_64.rpm python25-2.5.1-bashton1.x86_64.rpm Step 3 Now change the first line in the youtube.dl script (/usr/bin/youtube-dl) to this: # !/usr/bin/env python25 That did it for me - the videos download again now. If I change the first line back to the old way (without '25' after python), it errors out as before. This is not my forte, so if I just got lucky and there is a better way to do this, please advise. If you give me the OK, I'll post this workaround in a couple centos groups so folks can find it; you can link the FAQ to one of those or just paste this in. The error before these changes was: Traceback (most recent call last): File "/usr/bin/youtube-dl", line 12, in ? import ctypes ImportError: No module named ctypes
Author
Owner

@ZiaMM commented on GitHub (Apr 17, 2011):

Correction, the issue-ware took the "#" in my post as "hardrule + bold". Just add "25" to the end of the first line of the script.

@ZiaMM commented on GitHub (Apr 17, 2011): Correction, the issue-ware took the "#" in my post as "hardrule + bold". Just add "25" to the end of the first line of the script.
Author
Owner

@rg3 commented on GitHub (Sep 10, 2011):

No idea, I don't use Red Hat.

@rg3 commented on GitHub (Sep 10, 2011): No idea, I don't use Red Hat.
Author
Owner

@phihag commented on GitHub (Sep 10, 2011):

ctypes support is conditional (only on windows) now anyway, so I don't think this bug applies. If it does, please file a new one.

@phihag commented on GitHub (Sep 10, 2011): ctypes support is conditional (only on windows) now anyway, so I don't think this bug applies. If it does, please file a new one.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl#83
No description provided.