码迷,mamicode.com
首页 > 编程语言 > 详细

WARN bzip2.Bzip2Factory: Failed to load/initialize native-bzip2 library system-native, will use pure-Java version

时间:2018-12-09 17:26:54      阅读:854      评论:0      收藏:0      [点我收藏+]

标签:targe   zlib   sts   技术分享   oop   lz4   lse   分享   init   

[root@hdp2 /root]#hadoop checknative -a

18/12/09 00:31:19 WARN bzip2.Bzip2Factory: Failed to load/initialize native-bzip2 library system-native, will use pure-Java version

18/12/09 00:31:19 INFO zlib.ZlibFactory: Successfully loaded & initialized native-zlib library
Native library checking:
hadoop: true /mnt/software/hadoop-2.6.0-cdh5.7.0/lib/native/libhadoop.so.1.0.0
zlib: true /lib64/libz.so.1
snappy: true /mnt/software/hadoop-2.6.0-cdh5.7.0/lib/native/libsnappy.so.1
lz4: true revision:99
bzip2: false
openssl: true /lib64/libcrypto.so
18/12/09 00:31:19 INFO util.ExitUtil: Exiting with status 1

不支持bzip2 

解决方案

1    按照bzip2包  

yum -y install bzip2-devel

2 安装成功后  重新编译Hadoop  到Hadoop源码目录下

 mvn package -Pdist,native -DskipTests -Dtar -Djavax.net.debug=all

3 编译完之后 检查 是否编译成功

strings ~/build/hadoop-2.6.0-cdh5.7.0/hadoop-dist/target/hadoop-2.6.0-cdh5.7.0/lib/native/libhadoop.so | grep initIDs

看到有bzip2信息表示成功

技术分享图片

4  拷贝编译好的native下文件 替换

cp ~/build/hadoop-2.6.0-cdh5.7.0/hadoop-dist/target/hadoop-2.6.0-cdh5.7.0/lib/native/*  /mnt/software/hadoop-2.6.0-cdh5.7.0/lib/native/

5 然后 再次执行Hadoop checknative -a

[root@hdp1 /mnt/software/hadoop-2.6.0-cdh5.7.0/lib]#hadoop checknative -a

技术分享图片

解决问题

 

WARN bzip2.Bzip2Factory: Failed to load/initialize native-bzip2 library system-native, will use pure-Java version

标签:targe   zlib   sts   技术分享   oop   lz4   lse   分享   init   

原文地址:https://www.cnblogs.com/QuestionsZhang/p/10092029.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!