此处遵循说明:Ambari 2.7.5 installation failure on CentOS 7
我遵循了完全相同的说明,现在从构建的ambari-admin部分获取此信息:
[INFO] --- exec-maven-plugin:1.2.1:exec (Bower install) @ ambari-admin ---
bower angular-route#*
bower angular-route#*
bower underscore#1.7.0
bower underscore#1.7.0
bower bootstrap#3.3.7
bower bootstrap#3.3.7
bower angular-mocks#*
bower angular-mocks#*
bower angular#*
bower angular#*
bower font-awesome#4.2.0
bower font-awesome#4.2.0
bower angular-translate#*
bower angular-translate#*
bower chai#1.8.0
bower chai#1.8.0
bower mocha#1.14.0
bower mocha#1.14.0
bower angular-animate#*
bower angular-animate#*
bower angular-bootstrap-toggle-switch#0.5.1
bower angular-bootstrap-toggle-switch#0.5.1
bower restangular#1.4.0
bower restangular#1.4.0
bower commonjs#0.2.0
bower commonjs#0.2.0
bower sinon#1.10.3
bower sinon#1.10.3
bower angular-bootstrap#0.11.0
bower angular-bootstrap#0.11.0
bower angular#>=1.2.26 <1.8
bower angular#>=1.2.26 <1.8
bower lodash#>=1.3.0 <2.5.0
bower lodash#>=1.3.0 <2.5.0
bower angular#>=1
bower angular#>=1
bower jquery#1.9.1 - 3
bower jquery#1.9.1 - 3
bower ECONFLICT Unable to find suitable version for angular
如有必要,我可以提供整个堆栈。
我的问题是: 1.为什么项目在2周前构建,而现在完全没有任何更改,但上述堆栈失败了? 2.如何解决此问题?
真的很感谢您的任何投入或帮助。
根据要求,这是我遵循的步骤:
1. Using lxc to create centOS 7 x86_64 environment:
lxc launch images:centos/7/amd64 cent7
2. Attach to that kernal, this logs you in as root in a bash shell
lxc exec cent7 bash
3. Install necessary packages
yum install -y which
yum install -y wget
yum install -y rpm-build*
yum install -y gcc*
yum install -y git*
yum install -y python-devel*
yum install -y maven
(This installs an old version,3.0.5, but takes care of all dependencies such as java)
Get latest version of maven, Ambari build needs at least 3.3.9
mkdir /maven363 ; cd /maven363
wget http://mirror.cogentco.com/pub/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
tar zxf apache-maven-3.6.3-bin.tar.gz
## Setup paths to this maven in .bashrc file
vi ~/.bashrc
export PATH=/maven363/apache-maven-3.6.3/bin:$PATH
export _JAVA_OPTIONS="-Xmx2048m -XX:MaxPermSize=512m -Djava.awt.headless=true"
## Instantiate the above .bashrc changes
. ~/.bashrc
Get python tools for python 2.7
mkdir /PythonTools ; cd /PythonTools/
wget https://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg#md5=fe1f997bc722265116870bc7919059ea
sh setuptools-0.6c11-py2.7.egg
4. Get the Ambari source code
mkdir /Ambari275 ; cd /Ambari275
wget https://www-eu.apache.org/dist/ambari/ambari-2.7.5/apache-ambari-2.7.5-src.tar.gz
5. Untar the file
tar zxf apache-ambari-2.7.5-src.tar.gz
6. Fix the ambari-admin pom.xml file to load the correct versions of npm and node.js (This module had compilation errors),
Found fix information here:
https://stackoverflow.com/questions/61542102/ambari-2-7-5-installation-failure-on-centos-7
cd /Ambari275/apache-ambari-2.7.5-src/ambari-admin
vi pom.xml
From:
<nodeVersion>v4.5.0</nodeVersion>
<npmVersion>2.15.0</npmVersion>
To:
<nodeVersion>v6.17.1</nodeVersion>
<npmVersion>3.10.10</npmVersion>
7. Now follow all instructions here:
https://cwiki.apache.org/confluence/display/AMBARI/Installation+Guide+for+Ambari+2.7.5
答案 0 :(得分:0)
Q1:在您的构建环境中必须进行了某些更改。无论哪种方式,如果构建环境中的版本都不理想,则整个项目中更深层次的依赖项会发生冲突。
第二季度:您正在寻找的解决方案是修改以下文件:
nano ambari-admin/src/main/resources/ui/admin-web/bower.json
内容应为:
{
"name": "adminconsole",
"private": true,
"dependencies": {
"bootstrap": "3.3.7",
"angular": "1.3.0",
"angular-route": "1.3.0",
"angular-bootstrap": "0.11.0",
"underscore": "1.7.0",
"restangular": "1.4.0",
"angular-bootstrap-toggle-switch": "0.5.1",
"angular-animate": "1.3.0",
"angular-translate": "~2.8.1",
"font-awesome": "4.2.0"
},
"devDependencies": {
"angular-mocks": "1.3.0",
"commonjs": "0.2.0",
"chai": "1.8.0",
"mocha": "1.14.0",
"sinon": "1.10.3"
}
}
构建环境具有以下版本:
npm -v
6.14.4
node -v
v10.21.0
python -V
Python 2.7.18
mvn -v
Apache Maven 3.6.3
您可能需要使用有角度的版本。我上面发布的代码段是今天在不同的操作系统(SUSE / openSUSE)中为我工作的代码段。我在centos中没有收到此错误。我已经撰写并参与了一些最新的SO线程,因此可以从Source深入了解Ambari 2.7.5。