在ubuntu中安装node-gd

时间:2016-02-28 08:02:06

标签: node.js gd node-gyp

当我安装node-gd lib时,我收到以下警告:

root@iZ25mlpjokyZ:~# npm install node-gd
/
> node-gd@1.1.0 install /root/node_modules/node-gd
> node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/4.3.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/root/node_modules/node-gd/.node-gyp"
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/node_modules/node-gd/.node-gyp/4.3.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/root/node_modules/node-gd/.node-gyp"

2 个答案:

答案 0 :(得分:2)

感谢。 我用以下命令解决了它:

Gemfile.lock

答案 1 :(得分:0)

网站上的软件包告诉我们使用ubuntu软件包管理器来安装libgd2-dev

sudo apt-get install libgd2-dev

但是此软件包在源列表中不可用,对我有用的东西如下

sudo apt-get isntall libgd-dev 
npm i node-gd --save