Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Disabled stack guard problems for Hadoop 2.4libhadoop.so

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Because the 2.4.0 default configuration of libhadoop is 32-bit, the following error is prompted during the operation of the 64-bit operating system environment:

Java HotSpot (TM) 64-Bit Server VM warning: You have loaded library / opt/hadoop-2.2.0/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'.

13-11-01 10:58:59 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... Using builtin-java classes where applicable

The code for Hadoop needs to be recompiled to get the appropriate library file. Follow these steps.

Download the Hadoop 2.4.0 source code

You can download the source code for Hadoop 2.2.0 from the official Apache, or download the source code for Hadoop 2.2.0 at the following URL:

Http://mirrors.cnnic.cn/apache/hadoop/common/hadoop-2.2.0/hadoop-2.2.0-src.tar.gz

Configure the compilation environment

In the Ubuntu 12.04.3 LTS environment used in this article, the compiler environment is installed first:

[plain] view plain copy print?

$yum install

Yum install gcc gcc-c++ kernel-devel

$yum install gathers + autoconf automake libtool cmake zlib1g-dev pkg-config libssl-dev

Install build-essential

Yum groupinstall "Development Tools"

At this time, you need to use the wget command to download the resource package on the network.

Wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo-O / etc/yum.repos.d/epel-apache-maven.repo

Then reinstall maven

Install maven

Yum-y install apache-maven

Configure protobuf

The compilation process requires the use of protobuf, so it is recommended to install it first. The default protobuf of Ubuntu repository is version 2.4.1, which requires the latest version 2.5:

Https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz

After downloading and decompressing, execute:

[plain] view plain copy print?

$tar xzvf protobuf-2.5.0.tar.gz

$cd protobuf-2.5.0

$. / configure-prefix=/usr

$make

$sudo make install

Compile hadoop

Decompress it into the hadoop source directory and perform the compilation:

[plain] view plain copy print?

$tar xzvf hadoop-2.2.0-src.tar.gz

$cd hadoop-2.2.0-src

$mvn package-Pdist,native-DskipTests-Dtar

Maven automatically downloads dependencies during compilation. When the compilation is complete, the system prompts for the following information:

[plain] view plain copy print?

[INFO] BUILD SUCCESS

[INFO]

[INFO] Total time: 15:39.705s

[INFO] Finished at: Fri Nov 01 14:36:17 CST 2013

[INFO] Final Memory: 135M/422M

Then you can get the compiled libhadoop in the following directory:

[plain] view plain copy print?

Hadoop-2.2.0-src/hadoop-dist/target/hadoop-2.2.0/lib

Note: under the default source address, it takes a long time to download maven. It is recommended to use domestic sources. Refer to "maven domestic Image configuration" document.

Then replace the compiled lib/native folder with the original one.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report