npm install sharp 安装太卡
npm install sharp --unsafe-perm

> sharp@0.28.1 install /space/www/cn_restfulapi/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.6/libvips-8.10.6-linux-x64.tar.br


在CentOS执行,卡住这里。解决方法是下载 https://github.com/lovell/sharp-libvips/releases/download/v8.10.6/libvips-8.10.6-linux-x64.tar.br 这个文件,放在目录 /root/.npm/_libvips。

然后执行就快多了。

npm install sharp --unsafe-perm

> sharp@0.28.1 install /space/www/cn_restfulapi/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

sharp: Using cached /root/.npm/_libvips/libvips-8.10.6-linux-x64.tar.br
+ sharp@0.28.1
updated 1 package and audited 358 packages in 95.244s


声明:本站所有文章和图片,如无特殊说明,均为原创发布,转载请注明出处。
随机推荐
CSS 基本语法
WordPress 引入自定义 JavaScript 文件
在 HTML 中引入 CSS
Git 提示“warning: in the working copy of ' LF will be replaced by CRLF”
Wordpress 主样式表(style.css)
WordPress 调用自定义头像
WordPress 数据库操作
Git 从远程仓库拉取代码覆盖本地代码