当前位置: 首页 > article >正文

【Hadoop】大数据权限管理工具Ranger2.1.0编译

目录

​编辑一、下载 ranger源码并编译

二、报错信息

报错1

报错2

报错3

报错4


一、下载 ranger源码并编译


ranger官网

https://ranger.apache.org/download.html

由于Ranger不提供二进制安装包,故需要maven编译。安装其它依赖:


yum install gcc git python3 bzip2 fontconfig-devel npm curl-devel expat-devel gettext-devel openssl-devel zlib-devel  perl-ExtUtils-MakeMaker -y

安装maven



wget --no-check-certificate https://dlcdn.apache.org/maven/maven-3/3.9.8/binaries/apache-maven-3.9.8-bin.tar.gz
tar -zxvf apache-maven-3.9.8-bin.tar.gz

# 配置环境
vim /etc/profile
export MAVEN_HOME=/opt/software/apache-maven-3.9.8
export PATH=$PATH:$MAVEN_HOME/bin

MAVEN_OPTS=-Xmx2048m

查看版本信息

修改maven源为阿里源或网易源

vim settings.xml

<mirrors>
   <mirror>
     <id>nexus-aliyun</id>
     <mirrorOf>central</mirrorOf>
     <name>Nexus aliyun</name>
     <url>http://maven.aliyun.com/nexus/content/groups/public</url>
   </mirror>

   <mirror>
     <id>CN</id>
     <name>OSChina Central</name>
     <url>http://maven.oschina.net/content/groups/public/</url>
     <mirrorOf>central</mirrorOf>
   </mirror>

   <mirror>
     <id>alimaven</id>
     <mirrorOf>central</mirrorOf>
     <name>aliyun maven</name>
     <url>https://maven.aliyun.com/nexus/content/repositories/central/</url>
   </mirror>

   <mirror>
     <id>jboss-public-repository-group</id>
     <mirrorOf>central</mirrorOf>
     <name>JBoss Public Repository Group</name>
     <url>https://repository.jboss.org/nexus/content/groups/public</url>
   </mirror>
</mirrors>


下载 ranger源码


mkdir -p /opt/module
cd /opt/module
# 下载
wget --no-check-certificate   https://dlcdn.apache.org/ranger/2.1.0/apache-ranger-2.1.0.tar.gz

tar -zxvf apache-ranger-2.1.0.tar.gz

开始编译

mvn clean compile package assembly:assembly install -DskipTests -Drat.skip=true

mvn clean compile package assembly:assembly install  -DskipTests -Drat.skip=true

二、报错信息


报错1

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:install-node-and-npm (install node and npm) on project security-admin-web: Could not download npm: Got error code 404 from the server.

解决方式如下:

下载 npm-6.4.1.tgz 文件(或其他指定版本):

官方地址:https://registry.npmjs.org/npm/-/npm-6.4.1.tgz

淘宝镜像地址:https://registry.npmmirror.com/npm/-/npm-6.4.1.tgz

将文件放置到 Maven 本地仓库的对应路径:

复制
~/.m2/repository/com/github/eirslett/npm/6.4.1/npm-6.4.1.tar.gz

报错2


[WARNING] Checksum validation failed, expected '<!DOCTYPE' (REMOTE_EXTERNAL) but is actually '8b563b3f0ca085e81a5e97d426bf678592229282' from npm for https://npmmirror.com/net/sf/jopt-simple/jopt-simple/5.0.2/jopt-simple-5.0.2.jar
[WARNING] Could not validate integrity of download from https://npmmirror.com/net/sf/jopt-simple/jopt-simple/5.0.2/jopt-simple-5.0.2.jar
org.eclipse.aether.transfer.ChecksumFailureException: Checksum validation failed

Maven 仓库错误地指向了 https://npmmirror.com(淘宝 NPM 镜像) ,删除即可。

报错3

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  11:14 min
[INFO] Finished at: 2025-01-15T13:59:44+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.1.1:tree (default-cli) on project ranger-kylin-plugin: Cannot build project dependency graph: Could not resolve nor collect following dependencies: [org.apache.calcite:calcite-linq4j:jar:1.16.0-kylin-r2 (provided)]: Could not resolve dependencies for project org.apache.ranger:ranger-kylin-plugin:jar:2.1.0
[ERROR] dependency: org.apache.calcite:calcite-linq4j:jar:1.16.0-kylin-r2 (provided)
[ERROR] 	Could not find artifact org.apache.calcite:calcite-linq4j:jar:1.16.0-kylin-r2 in huaweicloud (https://repo.huaweicloud.com/repository/maven/)
[ERROR] 	Could not find artifact org.apache.calcite:calcite-linq4j:jar:1.16.0-kylin-r2 in cloudera (https://repository.cloudera.com/artifactory/cloudera-repos/)
[ERROR] 	Could not find artifact org.apache.calcite:calcite-linq4j:jar:1.16.0-kylin-r2 in aliyunmaven-central (https://maven.aliyun.com/repository/central)
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :ranger-kylin-plugin

 vim /root/.m2/repository/org/apache/kylin/kylin/2.6.4/kylin-2.6.4.pom	

报错4

Caused by: java.io.FileNotFoundException: JAR entry META-INF/MANIFEST.MF not found in /opt/apache-ranger-2.1.0/security-admin/target/security-admin-web-2.1.0.war

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.6:single (default) on project ranger-distro: Failed to create assembly: Error creating assembly archive admin: Problem creating TAR: entry 'ranger-2.1.0-admin/ews/webapp/META-INF/MANIFEST.MF' closed at '0' before the '130' bytes specified in the header were written

之后再重新编译

mvn clean compile package assembly:assembly install  -DskipTests -Drat.skip=true

编译完成后的安装包


参考文章:

https://juejin.cn/post/6844904159930482696

记一次apache ranger编译问题_[error] failed to execute goal on project ranger-k-CSDN博客


http://www.kler.cn/a/540507.html

相关文章:

  • Docker安装Redis
  • 前端 CSS 动态设置样式::class、:style 等技巧详解
  • leetcode 80. 删除有序数组中的重复项 II
  • PyTorch Profiler 的使用
  • 【分布式理论8】分布式调用之:四种IO模型
  • string 与 wstring 的字符编码
  • 在spring boot 项目中远程调用时,如果使用subList()方法报错原因分析
  • CNN-GRU卷积神经网络门控循环单元多变量多步预测,光伏功率预测(Matlab完整源码和数据)
  • python视频爬虫
  • 定制化APP:开启企业数字化转型新未来
  • 15 大 AWS 服务
  • 比亚迪发布智能化战略,天神之眼开创全民智驾
  • 工厂方法模式详解(Java)
  • Vue 和 React 的生态系统有哪些主要区别
  • Vue 和 React 在性能上的具体差异是什么
  • 服务器绑定 127.0.0.1 和 0.0.0.0 的区别
  • 大模型训练-gpu显卡训练环境搭建
  • ArcGIS Pro批量创建离线服务sd包
  • Kitchen Gadgets
  • Qt:项目文件解析
  • 海云安开发者智能助手(D10)全面接入DeepSeek,赋能开发者安全高效编码新范式
  • JavaScript特效大全:343个动态效果实例教程
  • 【信息系统项目管理师-案例真题】2017下半年案例分析答案和详解
  • 一键查看电脑各硬件详细信息 轻松查看电脑硬件参数
  • 03/29 使用 海康SDK 对接时使用的 MysqlUtils
  • 利用蓝耘智算平台深度搭建deepseek R1模型,进行深度机器学习