は14

2017-09-19 11 views
0

は、Ubuntuの14.04でNPMを使用して行う(カイロインストールした後で)キャンバスをインストールカントUbuntuでNPMを使用してキャンバスをインストールは14

sudo chown -R $(whoami) /usr/local/lib/node_modules 

sudo apt-get install libcairo2-dev libjpeg-dev libgif-dev 

すべて正常に動作します。

私もちょうど、ディレクトリを構築/キャンバスを作ってみましたが、それは問題のdoesntとディレクトリがあるため、それが重要ならば、私はまた、ソフトリンクにコマンド「ノード」を持っていた、再び

mkdir /home/ubuntu/server/node_modules/canvas/build 

をNPMを実行した後に消えますUbuntuはノード

sudo ln -s /usr/bin/nodejs /usr/bin/node 

を実行する代わりに、「ノード」を使用すると、入力します「nodejs」も、手動でカイロをインストール(およびすべての作品ということ)しようとしたが、それは

で、問題doesntのとにかくここ

は私が実行した後に取得エラーです:

sudo npm install canvas 


gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/ubuntu/server/node_modules/canvas/build' 
gyp ERR! System Linux 3.13.0-116-generic 
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /home/ubuntu/server/node_modules/canvas 
gyp ERR! node -v v8.1.0 
gyp ERR! node-gyp -v v3.6.2 
gyp ERR! not ok 
npm WARN server No description 
npm WARN server No repository field. 
npm WARN server No license field. 

npm ERR! code ELIFECYCLE 
npm ERR! errno 1 
npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script. 

私も実行してみました私は 'ノード-GYP' をインストールしようとしていると私は何も

sudo apt-get install node-gyp 
Reading package lists... Done 
Building dependency tree  
Reading state information... Done 
node-gyp is already the newest version. 
0 upgraded, 0 newly installed, 0 to remove and 74 not upgraded. 

を変更することはありません飽き:

node-gyp rebuild 

gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1 
gyp ERR! stack  at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:431:16) 
gyp ERR! stack  at ChildProcess.EventEmitter.emit (events.js:98:17) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (child_process.js:797:12) 
gyp ERR! System Linux 3.13.0-116-generic 
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild" 
gyp ERR! cwd /home/ubuntu/server 
gyp ERR! node -v v0.10.25 
gyp ERR! node-gyp -v v0.10.10 
gyp ERR! not ok 

答えて

1

私はUbuntuでキャンバスとカイロのソリューションを持っていません14.04

良いニュースは、私は定期的に

sudo apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++ 

sudoのNPM探しpackage.jsonと

をインストールする私のシステムを拭いとUbuntu 16.04とノード8とし「それが動作」で開始されましたlike

{ 
"dependencies": { 
    "canvas": "~1", 
    } 
} 
関連する問題