3.2 The platform "linux" is incompatible with this module.
[ERROR] warning fsevents@0.3.8: The platform "linux"is incompatible withthis module.
npm install pm2@latest -g
pm2 install pm2-slack
3.3 Failed to run task: 'yarn install --ignore-engines --pure-lockfile' failed.
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.4:yarn (yarn install) on project ambari-web: Failed to run task: 'yarn install --ignore-engines --pure-lockfile' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
[INFO] --- exec-maven-plugin:1.2.1:exec (Bower install) @ ambari-admin ---
bower error Unexpected token {
Stacktrace:
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/root/src_code/ambari/apache-ambari-2.7.5-src/ambari-admin/src/main/resources/ui/admin-web/node_modules/bower/node_modules/bower-registry-client/node_modules/request/lib/cookies.js:3:13)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
最终解决方案
vi ambari-admin/pom.xml
<argument>${basedir}/src/main/resources/ui/admin-web/node_modules/bower/bin/bower</argument>
<argument>bower</argument>
3.5 Too many files with unapproved license
[ERROR] Failed toexecute goal org.apache.rat:apache-rat-plugin:0.12
:check (default) on project ambari-admin: Too many files with unapproved license: 1 See RAT report in: /root/src_code/ambari/apache-ambari-2.7.5-src/ambari-admin/target/rat.txt -> [Help 1]
mvn 命令后加上参数 -Drat.skip 来绕过文件许可。
3.6 Can't get https://s3.amazonaws.com/xxx
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (default) on project ambari-metrics-timelineservice: An Ant BuildException has occured: Can't get https://s3.amazonaws.com/dev.hortonworks.com/HDP/centos7/3.x/BUILDS/3.1.4.0-315/tars/hbase/hbase-2.0.2.3.1.4.0-315-bin.tar.gz to /root/src_code/ambari/apache-ambari-2.7.5-src/ambari-metrics/ambari-metrics-timelineservice/target/embedded/hbase.tar.gz
[ERROR] around Ant part ...<get usetimestamp="true" src="https://s3.amazonaws.com/dev.hortonworks.com/HDP/centos7/3.x/BUILDS/3.1.4.0-315/tars/hbase/hbase-2.0.2.3.1.4.0-315-bin.tar.gz" dest="/root/src_code/ambari/apache-ambari-2.7.5-src/ambari-metrics/ambari-metrics-timelineservice/target/embedded/hbase.tar.gz"/>... @ 5:289in /root/src_code/ambari/apache-ambari-2.7.5-src/ambari-metrics/ambari-metrics-timelineservice/target/antrun/build-Download HBase.xml
[exec] psutil/_psutil_linux.c:12:20: fatal error: Python.h: No such file or directory
[exec] #include <Python.h>
[exec] ^
[exec] compilation terminated.
[exec] error: command'gcc' failed with exit status 1
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (psutils-compile) on project ambari-metrics-host-monitoring: An Ant BuildException has occured: exec returned: 1
[ERROR] around Ant part ...<exec failonerror="true"dir="/root/src_code/ambari/apache-ambari-2.7.5-src/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/psutil" executable="/root/src_code/ambari/apache-ambari-2.7.5-src/ambari-metrics/ambari-metrics-host-monitoring/../../ambari-common/src/main/unix/ambari-python-wrap">... @ 4:307 in /root/src_code/ambari/apache-ambari-2.7.5-src/ambari-metrics/ambari-metrics-host-monitoring/target/antrun/build-psutils-compile.xml