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

youtube-dl fails on Centos 8 #2900

Closed
cgarwood82 opened this issue Jun 25, 2020 · 3 comments
Closed

youtube-dl fails on Centos 8 #2900

cgarwood82 opened this issue Jun 25, 2020 · 3 comments

Comments

@cgarwood82
Copy link
Contributor

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"
}
@Chocobozzz
Copy link
Owner

Hello,

The shebang is part of the youtube-dl binary (https://github.com/ytdl-org/youtube-dl/releases/tag/2020.06.16.1) so we can't really do anything here. Maybe you could add this step in the documentation?

@cgarwood82
Copy link
Contributor Author

Will do. I'll hack this out today.

@cgarwood82
Copy link
Contributor Author

#2904

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

No branches or pull requests

2 participants