Techs Worldwide has moved to a new location with a new name and more advanced features. Click here to visit Geeks Worldwide for technology news, tutorials, videos, tools, and discussions.
Today: 02/04/2012
 

Installing Libpng on Ubuntu Linux

 

This short tutorial shows you how to install libpng on Ubuntu Linux Server. The process is very simple. For this tutorial, I'll be installing libpng version 1.2.18. Linux kernel is 2.6.15-26-powerpc. I have used a Mac Mini (powerpc/ppc architecture). GCC version number is 4.0.3. Your configuration may be different from mine but the installation steps below should work fine for most configurations with little or no change at all (including other Linux distributions and even unixes e.g. MacOS x).

Libpng:

According to libpng.sourceforge.net,

"This is an open source project to develop and maintain the reference library for use in applications that create and manipulate PNG (Portable Network Graphics) raster image files."

Before starting, please check to see if there is a latest version available to download. Visit http://libpng.sourceforge.net/ to find out about the available versions. IMPORTANT: See "Configuring Ubuntu Linux After Installation" to install the development tools required to compile and install libpng from source code.

Steps to download, compile, and install are as follows. Note: Replace 1.2.18 with your version number:

  • Install zlib development package:

    Without sudo,

    apt-get install zlib1g-dev

    With sudo,

    sudo apt-get install zlib1g-dev
    Run command above to install the zlib development package.
  • Downloading Libpng:

    Run the command below,
    wget http://downloads.sourceforge.net/libpng/libpng-1.2.18.tar.gz?modtime=1179259677&big_mirror=0

    NOTE: If the download link (above) does not work, go to http://downloads.sourceforge.net/libpng/ to find a new link.

  • Extracting files from the downloaded package:

    tar -xvzf libpng-1.2.18.tar.gz

    Now, enter the directory where the package is extracted.

    cd libpng-1.2.18

  • Configuring Libpng Library:

    ./configure --prefix=/usr/local/libpng

    Replace "/usr/local/libpng" above with the directory path where you want to copy the files and folders. Note: check for any error message.
  • Compiling Libpng:

    make

    Note: check for any error message.

  • Installing libpng:

    As root (for privileges on destination directory), run the following.

    With sudo,

    sudo make install

    Without sudo,

    make install

    Note: check for any error messages.

That’s it. Library has bee successfully installed.

=======================================================================================

Support Geeks Worldwide:

Link to us:

You can support us by putting a link to our website on your blog or website (code is below).

<a href="http://www.techsww.com/">
Geeks Worldwide - Tutorials about Software Installation,
Configuration, Administration, Monitoring, Tools, Tips &
Tricks
</a>

OR a simple one.

<a href="http://www.techsww.com/">
Geeks Worldwide - IT related Tutorials
</a>

Feedbacks:

We appreciate feedbacks and suggestions about our tutorials and Geeks Worldwide from readers. Please contact us using the form here and let us know what you think about the tutorial and the website in general.

Bookmark Us:

We are working on new features for the website, please keep visiting or bookmark us using your favourite bookmarking service.

Subscribe to RSS:

You can subscribe to our RSS feed here.



 
Creative Commons License   Valid XHTML 1.0 Transitional Valid CSS