Shit, it took me 2 days to compile! The main problem is that the card is too long. -. Keep a record of my stomping process and hope it can help you. If you have any other questions, please leave a comment in the comment section and I will answer them one by one.

1. Compile environment

contOS7

JDK8

Maven 3.6

Deployment package: 2.1.0atlas.apache.org/#/Downloads

Address: MVN warehouse maven.aliyun.com/nexus/conte…

The problem can be different depending on the compilation environment.

2. Install Atlas

1. Download the package, go to /opt, and run tar-xzvf to decompress the package

2. Go to the apache-atlas-sources-2.1.0 directory and run the command

MVN clean-DSkiptests package-PDIST, Embedded - hbase-Solr (built-in hbase and Solr)Copy the code

If t = t = a node-saas installation directory does not have a problem, then t = t = t

sudo mvn clean -DskipTests package -Pdist,embedded-hbase-solr
Copy the code

Note: The environment variables of root and sudo are not necessarily the same. When I run the command in root state, a message is displayed indicating that I have no permission to install Node-saas. Problems with compiling environment versions after sudo execution.

If a compilation error occurs when sudo executes the command, sudo MVN -v checks whether the environment information is consistent. If not, you need to change the environment variable under sudo to be the same as root. The detailed modification method is as follows

  1. Executing sudo visudo
  2. Change Defaults env_reset to Defaults! Env_reset Cancels the reset of the PATH variable
  3. Bashrc =’sudo env PATH=$PATH’

The PATH sudo searches for when executing the command is the PATH of the system variable, as is the case when adding other variables

After the installation is complete: you will see that SUCCESS is displayed for all jars

3. Solve problems in the installation process

1. Node-saas installation fails

Gyp verb Command install ['6.17.1'] gyp ERR! UNCAUGHT EXCEPTION gyp ERR! Stack/MNT/HSWX/apache - atlas - sources - 2.1.0 / node_modules / _mkdirp @ @ mkdirp 1.0.4 / lib/opts - arg. Js: 7 gyp ERR! stack opts = { mode: 0o777, fs, ... opts } gyp ERR! stack ^^^ gyp ERR! stack gyp ERR! stack SyntaxError: Unexpected token ... gyp ERR! stack at createScript (vm.js:56:10) gyp ERR! stack at Object.runInThisContext (vm.js:97:10) gyp ERR! stack at Module._compile (module.js:549:28) gyp ERR! stack at Object.Module._extensions.. js (module.js:586:10) gyp ERR! stack at Module.load (module.js:494:32) gyp ERR! stack at tryModuleLoad (module.js:453:12) gyp ERR! stack at Function.Module._load (module.js:445:3) gyp ERR! stack at Module.require (module.js:504:17) gyp ERR! stack at require (internal/module.js:20:19) gyp ERR! <anonymous> (/ MNT/HSWX /apache-atlas-sources-2.1.0/node_modules/[email protected]@mkdirp/index.js:1:79) gyp ERR! System Linux 3.10.0-1127.19.1.el7.x86_64 Gyp ERR! The command "/ usr/bin/node" "/ MNT/HSWX/apache - atlas - sources - 2.1.0 / node_modules / _node - [email protected] @ node - gyp/bin/node - gyp. Js." " "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" gyp ERR! CWD/MNT/HSWX/apache - atlas - sources - 2.1.0 / node_modules / _node - [email protected] @ node - sass gyp ERR! Node -v v6.17.1 Gyp ERR! Node-gop-v v7.1.2 gyp ERR! Node-gyp failed to build your package. gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author. Build failed with error  code: 7 [npminstall:runscript:error] node-sass@* scripts.postinstall run "node scripts/build.js" error: RunScriptError: Run "sh -c node scripts/build.js" error, exit code 1 ? Install fail! RunScriptError: post install error, please remove node_modules before retry! Run "sh -c node scripts/build.js" error, exit code 1 RunScriptError: post install error, please remove node_modules before retry! Run "sh -c node scripts/build.js" error, exit code 1 at ChildProcess.proc.on.code (/usr/lib/node_modules/cnpm/node_modules/runscript/index.js:96:21) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:191:7) at maybeClose (internal/child_process.js:920:16) at Process.childprocess._handle. onexit (internal/child_process.js: 220:5) npminstall version: 3.28.0 npminstall args: /usr/bin/node /usr/lib/node_modules/cnpm/node_modules/npminstall/bin/install.js --fix-bug-versions --china --userconfig=/root/.cnpmrc --disturl=https://npm.taobao.org/mirrors/node --registry=https://r.npm.taobao.org node-sass --save-devCopy the code

This problem has been bothering me for days, not compiling alone, nor the NPM source. I am surprised that the root account does not have permission to create. So sudo was used to execute the command.

Use this command:

sudo mvn clean -DskipTests package -Pdist,embedded-hbase-solr
Copy the code

Using sudo can cause inconsistencies with the root compilation environment. As I mentioned above, sudo and root use the same set of environment variables.

Sqoop.Jar cannot be downloaded

` ` `
[ERROR] Failed to execute goal on project sqoop-bridge-shim: Could not resolve dependencies for project org.apache.atlas:sqoop-bridge-shim:jar:2.1.0: Could not find an artifact org. Apache. Sqoop: sqoop: jar: 1.4.6.2.3.99.0-195 in the nexus – aliyun (Maven.aliyun.com/nexus/conte…) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
` ` `

Sqoop. jar (1.4.6.2.3.99.0-195) is not easy to find. I am using is ali’s warehouse maven.aliyun.com/nexus/conte…

You can download the JAR package manually

Download address: repo.hortonworks.com/content/rep…

Run the following command to install to the local repository

MVN install: install-file-dfile =sqoop-1.4.6.2.3.99.0-195.jar -dgroupid =org.apache. sqoop-dartifactid =sqoop - Dversion = 1.4.6.2.3.99.0-195 - Dpackaging = jarCopy the code

Then execute the compile command.