Hi: A kylin user once encountered similar problems when packaging. His solution is for your reference:
一、npm ERR! code ELIFECYCLE refer to: https://www.cleey.com/blog/single/id/911.html Download already available at /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 Verified checksum of previously downloaded file Extracting tar contents (via spawned process)Removing /usr/local/open_dnsdb/dnsdb_fe/node_modules/phantomjs-prebuilt/lib/phantom Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1614183154060/phantomjs-2.1.1-linux-x86_64 -> /usr/local/open_dnsdb/dnsdb_fe/node_modules/phantomjs-prebuilt/lib/phantom Phantom installation failed { [Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1614183154060/phantomjs-2.1.1-linux-x86_64' -> '/usr/local/open_dnsdb/dnsdb_fe/node_modules/phantomjs-prebuilt/lib/phantom'] errno: -13, code: 'EACCES', syscall: 'link', path: '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1614183154060/phantomjs-2.1.1-linux-x86_64', dest: '/usr/local/open_dnsdb/dnsdb_fe/node_modules/phantomjs-prebuilt/lib/phantom' } Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1614183154060/phantomjs-2.1.1-linux-x86_64' -> '/usr/local/open_dnsdb/dnsdb_fe/node_modules/phantomjs-prebuilt/lib/phantom' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm ERR! code ELIFECYCLE 解决: #下载 wget https://npm.taobao.org/mirrors/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 tar -jxvf phantomjs-2.1.1-linux-x86_64.tar.bz2 #加入环境变量 vim /etc/profile #末尾加入,注意文件路径export PATH=$PATH:/usr/local/phantomjs-2.1.1-linux-x86_64/bin #执行 source /etc/profile rm -rf ./node_modules && npm install --unsafe-perm 解决!!!! 二、phantomjs-prebuilt@2.1.16 错误 参照ttps://blog.csdn.net/XuM222222/article/details/82790802?utm_medium=distribute.pc_relevant.none-task-b > 在 2022年3月30日,上午9:48,guqiujun <guqiujun...@163.com> 写道: > > When I tried to package Kylin4.0.1, I ran package.sh and had the following > problem > The translation:当我尝试给kylin4.0.1打包时,运行package.sh,出现了以下问题 > > phantomjs-prebuilt@2.1.16 install > > /home/packageTest/apache-kylin-4.0.1/webapp/node_modules/phantomjs-prebuilt > > node install.js > > Considering PhantomJS found at /home/node/bin/phantomjs > Looks like an `npm install -g` > Could not link global install, skipping... > Download already available at > /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 > Verified checksum of previously downloaded file > Extracting tar contents (via spawned process) > Removing > /home/packageTest/apache-kylin-4.0.1/webapp/node_modules/phantomjs-prebuilt/lib/phantom > Copying extracted folder > /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1648604149099/phantomjs-2.1.1-linux-x86_64 > -> > /home/packageTest/apache-kylin-4.0.1/webapp/node_modules/phantomjs-prebuilt/lib/phantom > chmod failed: phantomjs was not successfully copied to > /home/packageTest/apache-kylin-4.0.1/webapp/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs > npm WARN tap@16.0.0 requires a peer of coveralls@^3.1.1 but none is > installed. You must install peer dependencies yourself. > npm WARN tap@16.0.0 requires a peer of flow-remove-types@>=2.112.0 but none > is installed. You must install peer dependencies yourself. > npm WARN tap@16.0.0 requires a peer of ts-node@>=8.5.2 but none is installed. > You must install peer dependencies yourself. > npm WARN tap@16.0.0 requires a peer of typescript@>=3.7.2 but none is > installed. You must install peer dependencies yourself. > npm WARN ws@7.5.7 requires a peer of bufferutil@^4.0.1 but none is installed. > You must install peer dependencies yourself. > npm WARN ws@7.5.7 requires a peer of utf-8-validate@^5.0.2 but none is > installed. You must install peer dependencies yourself. > npm WARN base@0.0.1 No license field. > npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 > (node_modules/fsevents): > npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for > fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: > {"os":"linux","arch":"x64"}) > > npm ERR! code ELIFECYCLE > npm ERR! errno 1 > npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js` > npm ERR! Exit status 1 > npm ERR! > npm ERR! Failed at the phantomjs-prebuilt@2.1.16 install script. > npm ERR! This is probably not a problem with npm. There is likely additional > logging output above. > > npm ERR! A complete log of this run can be found in: > npm ERR! /root/.npm/_logs/2022-03-30T01_35_52_321Z-debug.log > > Here is the environment information: > The translation:以下是打包环境信息: > CentorOs7 > Apache Maven 3.5.4 > git version 1.8.3.1 > node-v10.14.1-linux-x64 > npm6.4.1 > > Attached is the log of NPM > The translation:附件中是 npm的日志 > > > > <2022-03-30T01_35_52_321Z-debug.log>