youtube-dl fails on Centos 8 #2533

Open
opened 2026-02-22 07:00:59 -05:00 by deekerman · 0 comments
Owner

Originally created by @cgarwood82 on GitHub (Jun 25, 2020).

What happened?
Attempting to use the import function on a Centos 8 deployment fails. On centos 8, there is no python binary so the command fails. This is remedied by creating a symlink:

ln -s /usr/bin/python3 /usr/bin/python

Ideally though, the call should be explicitly to python3 as that is universally available on distros where as python is ambiguous. Not sure if this is an upstream NPM module issue. I couldn't find the code to fix this, probably because my javascript skills are terrible.

What do you expect to happen instead?
For the youtube video to imported

Steps to reproduce:

  1. Use import function on a centos 8 deployment

Additional information

  • PeerTube version or URL: vid.garwood.io

  • Browser name/version: Browser Independent

  • NodeJS version: v10.21.0

  • Link to browser console log if useful: NA

  • Link to server log if useful (journalctl or /var/www/peertube/storage/logs/):

{
  "level": "info",
  "message": "Cannot fetch information from import for URL https://www.youtube.com/watch?v=j3J5qsyTMUY.",
  "label": "vid.garwood.io:443",
  "err": {
    "stack": "Error: Command failed with exit code 127: /var/www/peertube/versions/peertube-v2.2.0/node_modules/youtube-dl/bin/youtube-dl --dump-json -f best -j --flat-playlist http://www.youtube.com/watch?v=j3J5qsyTMUY\n    at makeError (/var/www/peertube/versions/peertube-v2.2.0/node_modules/execa/lib/error.js:56:11)\n    at handlePromise (/var/www/peertube/versions/peertube-v2.2.0/node_modules/execa/index.js:114:26)\n    at process._tickCallback (internal/process/next_tick.js:68:7)",
    "message": "Command failed with exit code 127: /var/www/peertube/versions/peertube-v2.2.0/node_modules/youtube-dl/bin/youtube-dl --dump-json -f best -j --flat-playlist http://www.youtube.com/watch?v=j3J5qsyTMUY",
    "command": "/var/www/peertube/versions/peertube-v2.2.0/node_modules/youtube-dl/bin/youtube-dl --dump-json -f best -j --flat-playlist http://www.youtube.com/watch?v=j3J5qsyTMUY",
    "exitCode": 127,
    "stdout": "",
    "stderr": "/usr/bin/env: ‘python’: No such file or directory",
    "failed": true,
    "timedOut": false,
    "isCanceled": false,
    "killed": false
  },
  "timestamp": "2020-06-25T19:36:49.778Z"
}
Originally created by @cgarwood82 on GitHub (Jun 25, 2020). **What happened?** Attempting to use the import function on a Centos 8 deployment fails. On centos 8, there is no python binary so the command fails. This is remedied by creating a symlink: ln -s /usr/bin/python3 /usr/bin/python Ideally though, the call should be explicitly to python3 as that is universally available on distros where as python is ambiguous. Not sure if this is an upstream NPM module issue. I couldn't find the code to fix this, probably because my javascript skills are terrible. **What do you expect to happen instead?** For the youtube video to imported **Steps to reproduce:** 1. Use import function on a centos 8 deployment **Additional information** * PeerTube version or URL: vid.garwood.io * Browser name/version: Browser Independent * NodeJS version: v10.21.0 * Link to browser console log if useful: NA * Link to server log if useful (journalctl or /var/www/peertube/storage/logs/): ``` { "level": "info", "message": "Cannot fetch information from import for URL https://www.youtube.com/watch?v=j3J5qsyTMUY.", "label": "vid.garwood.io:443", "err": { "stack": "Error: Command failed with exit code 127: /var/www/peertube/versions/peertube-v2.2.0/node_modules/youtube-dl/bin/youtube-dl --dump-json -f best -j --flat-playlist http://www.youtube.com/watch?v=j3J5qsyTMUY\n at makeError (/var/www/peertube/versions/peertube-v2.2.0/node_modules/execa/lib/error.js:56:11)\n at handlePromise (/var/www/peertube/versions/peertube-v2.2.0/node_modules/execa/index.js:114:26)\n at process._tickCallback (internal/process/next_tick.js:68:7)", "message": "Command failed with exit code 127: /var/www/peertube/versions/peertube-v2.2.0/node_modules/youtube-dl/bin/youtube-dl --dump-json -f best -j --flat-playlist http://www.youtube.com/watch?v=j3J5qsyTMUY", "command": "/var/www/peertube/versions/peertube-v2.2.0/node_modules/youtube-dl/bin/youtube-dl --dump-json -f best -j --flat-playlist http://www.youtube.com/watch?v=j3J5qsyTMUY", "exitCode": 127, "stdout": "", "stderr": "/usr/bin/env: ‘python’: No such file or directory", "failed": true, "timedOut": false, "isCanceled": false, "killed": false }, "timestamp": "2020-06-25T19:36:49.778Z" } ```
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/PeerTube#2533
No description provided.