Peertube: [community] install fails importing compiler.ast

Created on 17 Jul 2018  路  3Comments  路  Source: Chocobozzz/PeerTube

Traceback (most recent call last):
File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 13, in
import gyp
File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 8, in
import gyp.input
File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 5, in
from compiler.ast import Const
ImportError: No module named compiler.ast
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.9.0-7-amd64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/www/peertube/node_modules/rdf-canonize
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.6.2

dpkg: error processing package peertube (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for systemd (232-25+deb9u4) ...
Errors were encountered while processing:
peertube
E: Sub-process /usr/bin/dpkg returned an error code (1)

Most helpful comment

I just had this exact error on a fresh install of ubuntu 18.04, following the peertube production guide.

I fixed it by running sudo apt-get install -y python-dev

All 3 comments

Hi @filmaidykai - you are using a community-made packaging of PeerTube. In case it doesn't work, you can always fall back to the production guide install which is the only one we can fully support here.

But first check your version of gcc meets the requirements (>= 4.9), as well as the version of gcc node is linked to.

Also check your version of python following this issue: https://github.com/lovell/sharp/issues/684

I just had this exact error on a fresh install of ubuntu 18.04, following the peertube production guide.

I fixed it by running sudo apt-get install -y python-dev

Was this page helpful?
0 / 5 - 0 ratings

Related issues

milleniumbug picture milleniumbug  路  3Comments

sschueller picture sschueller  路  3Comments

bristow picture bristow  路  3Comments

filmaidykai picture filmaidykai  路  3Comments

zilti picture zilti  路  3Comments