Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hadoop installation error message

Tags:

hadoop

hadoop OpenJDK Server VM warning: You have loaded library /usr/lib/hadoop/lib/native/libhadoop.so.1.0.0 which might have disabled stack guard. The VM will try to fix the stack guard now. It's highly recommended that you fix the library with 'execstack -c ', or link it with '-z noexecstack'.

I am getting this message while I was trying to install hadoop-yarn-resourcemanger due to which all other installations of hadoop packages are showing that the packages are broken on your system. How to fix this? Thanks

like image 561
proprius Avatar asked Oct 31 '22 23:10

proprius


2 Answers

I hit the same error while installing Hadoop 2.2 on a cluster running Ubuntu 14.04 64bit with Java 1.7.0_75. (Ain't no way I'm gonna downgrade to 32bit.) Here's how I compiled the native library.

This Hadoop 2.5 page for native libraries is helpful, it offers the required mvn command: http://hadoop.apache.org/docs/r2.5.0/hadoop-project-dist/hadoop-common/NativeLibraries.html#Build

  1. Make sure prereqs are met on linux. You must use maven version 3!

    apt-get install cmake autoconf automake libtool gcc zlib1g-dev pkg-config libssl-dev openssl maven
    
  2. Download a Hadoop source tarball from https://archive.apache.org/dist/hadoop/core

  3. Unpack and survey:

    tar xzpf hadoop-2.2.0-src.tar.gz
    cd hadoop-2.2.0-src
    
  4. Build the native library (not everything):

    cd hadoop-common-project/hadoop-common
    mvn package -Pdist,native -DskipTests=true -Dtar
    
  5. Copy the resulting .so file to the binary area.

    cp target/hadoop-common-2.2.0/lib/native/libhadoop.so.1.0.0 /home/hadoop/hadoop-2.2.0/lib/native/
    
  6. Test by starting a daemon to see if the warning 'disabled stack guard' (see above) still appears:

    /home/hadoop/hadoop-2.2.0/sbin/hadoop-daemon.sh start namenode n
    

I tested this on Hadoop source versions 2.2.0 and 2.5.2.

@user2345523 @DivyangShah hope this helps

like image 133
chrisinmtown Avatar answered Nov 15 '22 06:11

chrisinmtown


I got the same error and isn't it painful. The reason why you are getting this error is that the library file /usr/lib/hadoop/lib/native/libhadoop.so.1.0.0 is not meant for a 64 bit underlying architecture. So I know for sure you are using 64 bit Linux under for your installation. ;)

There are two things you can do. Firstly, the more right approach is that yu can rebuild the library, but then that is long procedure.

What I did was the second and the easier way out. I re-installed it on a 32-bit Ubuntu and it worked fine for me.

like image 37
HadoopFan Avatar answered Nov 15 '22 08:11

HadoopFan