Install zlibbzip2 on 64-bit Ubuntu

Source: Internet
Author: User
When a software is installed on 64-bit Ubuntu, it is always a compilation error. I remember that this error was not reported on a 32-bit machine... Almost gave up... Later, I tried to give it to me... Download idea

When a software is installed on 64-bit Ubuntu, it is always a compilation error. I remember that this error was not reported on a 32-bit machine... Almost gave up... Later, I tried to give it to me...

Download
Http://www.zlib.net/zlib-1.2.3.tar.gz
Http://www.bzip.org/1.0.5/bzip2-1.0.5.tar.gz

Both are direct

./Configure
Make
Make install

There is no problem with installation, but when compiling other software, the problem may occur on 64-bit machines:

/Usr/bin/ld:/usr/local/lib/libbz2.a: relocation R_X86_64_32 against 'a local symplo' can not be used when making a shared object; recompile with-fPIC

Solution

./Configure
Vi Makefile

Add-fPIC to CFLAGS

CFLAGS =-fPIC xxxxxxxxxxxxxxxxxx
Make & make install & make clean

Haha, right?

Related Article

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.