3
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

zlibをソースコードビルドする

Last updated at Posted at 2015-01-02

概要

これはなに?

目標

  • zlib-1.2.8 の共有オブジェクトがシステムに読み込まれる

実行環境

依存パッケージ

  • なし

導入手順

tar.gz をダウンロードする

wget http://zlib.net/zlib-1.2.8.tar.gz -P /usr/local/share/downloaded/

tar.gz を解凍する

tar -zxvf /usr/local/share/downloaded/zlib-1.2.8.tar.gz -C /usr/local/src/

configure を実行する

cd /usr/local/src/zlib-1.2.8/

./configure --prefix=/usr/local/lib/zlib-1.2.8

make を実行する

make

make install する

sudo make install

ディレクトリのシンボリックリンクを作成する

sudo ln -s /usr/local/lib/zlib-1.2.8 /usr/local/zlib

共有オブジェクトのパスを登録する

echo "/usr/local/lib/zlib-1.2.8/lib" > /usr/local/etc/ld.so.conf.d/zlib-1.2.8.conf

sudo ln -s /usr/local/etc/ld.so.conf.d/zlib-1.2.8.conf /etc/ld.so.conf.d/zlib-1.2.8.conf

sudo ldconfig

削除手順

導入時に生成したファイルを削除する

sudo rm -r /usr/local/share/downloaded/zlib-1.2.8.tar.gz
sudo rm -r /usr/local/src/zlib-1.2.8/
sudo rm -r usr/local/lib/zlib-1.2.8/
sudo rm -r /usr/local/zlib
sudo rm -r /usr/local/etc/ld.so.conf.d/zlib-1.2.8.conf
sudo rm -r /etc/ld.so.conf.d/zlib-1.2.8.conf

共有オブジェクトのパスを更新する

sudo ldconfig
3
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?