libpng + ubuntu 环境配置

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 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.5.4 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://prdownloads.sourceforge.net/libpng/libpng-1.5.4.tar.gz?download

    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 xzf libpng-1.5.4.tar.gz

    Now, enter the directory where the package is extracted.

    cd libpng-1.5.4

  • 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 messages.

  • 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.

Did this tutorial help a little? How about buy me a cup of coffee?

猜你喜欢

转载自blog.csdn.net/swxcuc/article/details/78994744