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.1updated 1 package and audited 358 packages in 95.244s