Resolve the debug problem of WARN NativeCodeLoader

Debug

Resolve the debug problem of when to start up spark, WARN NativeCodeLoader will turn on.

1
2
3
4
5
export HADOOP_HOME=/home/admin/hadoop
#export PATH=$HADOOP_HOME/bin:$PATH
#export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
#export HADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib/native"
#export LD_LIBRARY_PATH=$HADOOP_HOME/lib/native
1
2
WARN BLAS: Failed to load implementation from: com.github.fommil.netlib.NativeSystemBLAS
WARN BLAS: Failed to load implementation from: com.github.fommil.netlib.NativeRefBLAS

Solutions

Three ways to solve the problem

install libgfortran3
linstall libatlas3-base libopenblas-base
OpenBlase

1
2
3
4
5
6
sudo apt-get install libatlas3-base libopenblas-base
sudo update-alternatives --config libblas.so.3
sudo update-alternatives --config liblapack.so.3
$ /etc/ld.so.conf
add /usr/lib/libblas.so.3 & /usr/lib/liblapack.so.3
$ sudo ldconfig