WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
ㅜ_ㅜ 이놈의 에러는 뭐 아주그냥 나의 베스트 프렌드~^.~
http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/NativeLibraries.html 이거보면 native build 필요
[root@cl3 hadoop-2.7.6]# hadoop checknative
18/07/24 11:25:17 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Native library checking:
hadoop: false
zlib: false
snappy: false
lz4: false
bzip2: false
openssl: false
18/07/24 11:25:18 INFO util.ExitUtil: Exiting with status 1
2. snappy
3. 그리고 hadoop homepage에 나와있는 것들.
- C compiler (e.g. GNU C Compiler)
- GNU Autools Chain: autoconf, automake, libtool
- zlib-development package (stable version >= 1.2.0)
- openssl-development package(e.g. libssl-dev)
1) Protocol Buffers 설치 https://github.com/google/protobuf
$ wget https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz
* Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:2.7.6:protoc (compile-protoc) on project hadoop-common: org.apache.maven.plugin.MojoExecutionException: protoc version is 'libprotoc 2.6.1', expected version is '2.5.0'
라고 나중에 에러가 떠버린다. 그러므로 최신버전이 뭐던간에,, 무조건 2.5.0으로!
$ ./configure --prefix=/usr
$ make
$ make check #그냥 확인용
$ make install // make && make install로 한방에 해도 된다.
$ protoc --version
:해결방안
$vim /etc/ld.so.conf
/ usr / local / lib 라고 내용에 추가
$ldconfig
2) Snappy 설치 http://google.github.io/snappy/
$https://github.com/google/snappy/releases/download/1.1.3/snappy-1.1.3.tar.gz
$ ./configure --prefix=/usr
$ make
$ make install
3) gcc 설치 https://gist.github.com/jtilly/2827af06e331e8e6b53c (좀 오래걸림)
4) maven 설치 http://maven.apache.org/
$wget https://ftp.gnu.org/gnu/gcc/gcc-4.9.3/gcc-4.9.3.tar.gz
$vi /etc/profile
export MAVEN_HOME=설치경로
export PATH=$PATH:$MAVEN_HOME/bin
$source /etc/profile
3)->4)->5) 설치 순서는 중요하다. 이렇게 안하면 오류가 난다고 한다.
3) M4 설치http://ftp.gnu.org/gnu/m4/
4) autoconf 설치 ftp://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz
$ ./configure --prefix=/usr
$ make & make install
5) automake 설치 ftp://ftp.gnu.org/gnu/automake/
$ ./configure --prefix=/usr
ERROR
make 시도시 오류 발생
help2man: can't get `--help' info from automake-1.16
Try `--no-discard-stderr' if option outputs to stderr
make: *** [doc/automake-1.16.1] Error 255
해결;
1차 시도 . per 의존성 설치하라고 한다. https://centos.pkgs.org/7/centos-x86_64/perl-Thread-Queue-3.02-2.el7.noarch.rpm.html
안되어서 그냥 하위 버전 받았다.
$ ./configure --prefix=/usr
$ make & make install$ ./configure --prefix=/usr
$ make & make install
krb5-devel(x86-64) is needed by openssl-devel-1:1.0.2k-12.el7.x86_64
openssl-libs(x86-64) = 1:1.0.2k-12.el7 is needed by openssl-devel-1:1.0.2k-12.el7.x86_64
e2fsprogs-libs = 1.41.12-22.el6 is needed by (installed) e2fsprogs-1.41.12-22.el6.x86_64
빌드를 위해 아래의 명령어 실행
ERROR
the requested profile "dist" could not be activated because it does not exist.
http://www.apache.org/dist/hadoop/core/ 여기서 src버전으로 받아야 pom.xml 파일이 같이 있기때문에 빌드할 수 있음.
출처: http://bloodguy.tistory.com/entry/Hadoop-네이티브-라이브러리-빌드-build-native-library [Bloodguy]
출처: http://bloodguy.tistory.com/entry/Hadoop-네이티브-라이브러리-빌드-build-native-library [Bloodguy]
[root@cl3 native]# hadoop checknative
18/07/26 17:06:35 WARN bzip2.Bzip2Factory: Failed to load/initialize native-bzip2 library system-native, will use pure-Java version
18/07/26 17:06:35 INFO zlib.ZlibFactory: Successfully loaded & initialized native-zlib library
Native library checking:
hadoop: true /usr/local/cluster/hadoop/hadoop-2.7.6/lib/libhadoop.so.1.0.0
zlib: true /lib64/libz.so.1
snappy: false
lz4: true revision:99
bzip2: false
openssl: true /usr/lib64/libcrypto.so