Hadoop development in Ubuntu14 & lt; 2 & gt; compiling 64-bit Hadoop2.4

Source: Internet
Author: User

  • The official Hadoop website only provides 32-bit Hadoop packages. I installed a 64-bit system, which is naturally unavailable and reports an error. As a result, hadoop cannot be started.
libhadoop.so.1.0.0 which might have disabled stack guard.
  • You can find the libhadoop. so.1.0.0 file in the $ {Hadoop-Home}/lib/native folder. The following
yuping@YP-X100e:$ file /usr/mytools/hadoop-2.4.0/lib/native/libhadoop.so.1.0.0/usr/mytools/hadoop-2.4.0/lib/native/libhadoop.so.1.0.0:ELF 32-bit LSB shared object, Intel 80386,version 1 (SYSV), dynamically linked, not stripped
  • I didn't use svn. I downloaded the hadoop src package directly from the official website. After decompression, I went to the directory and ran it directly (don't forget, your current user needs operation permission on this folder)
mvn package -Pdist,native,docs -DskipTests -Dtar
  • After a long time of debugging, I searched for information and collected the packets.
  • At three o'clock P.M., the dependent software that should be installed includes
sudo apt-get install mavensudo apt-get install protobuf-compilersudo apt-get install cmakesudo apt-get install zlib1g.devsudo apt-get install g++sudo apt-get install libglib2.0-devsudo apt-get install libssl-dev
  • Maven is maven3. I mistakenly think maven is 1; ant is the 1.9 version that comes with the system.
  • Most errors can be found and solved on the Internet. Besides the libglib2.0-dev and zlib1g. dev dependent packages, the search takes a long time.
  • Cmake is the most crashed throughout the process. After installation, check the version. It is normal, but it still reports
an ant buildxception has occured exec returned 1
  • After carefully reading the running log, I found that my hadoop-src directory was in Chinese, and I was afraid that Chinese characters may affect compilation during compilation, then, the entire directory is copied to an English path, and the compilation operation has been performed before moving, but zlib1g is not installed. dev and libglib2.0-dev. Therefore, even if the dependent packages are installed, an error will still be reported. The solution is to delete the hadoop-src file and decompress it to the English path, perform the packaging operation again
  • About 40 minutes, deal with, the generated hadoop-2.4.0-src/hadoop-dist/target/hadoop-2.4.0, with this replace the previous 32-bit hadoop-2.4.0.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.