8
8

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.

CentOS 5.4 に Python 2.7.3 を install

Posted at

ダウンロード

$ wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
$ tar xvzf Python-2.7.3.tgz

コンパイル & インストール

$ cd Python-2.7.3
$ ./configure --enable-shared --prefix=/usr/local/python2.7.3
$ make
$ make install

動作確認

$ /usr/local/python2.7.3/bin/python -V
Python 2.7.3

動作確認で下記のエラーが発生したら

$ /usr/local/python2.7.3/bin/python -V
/usr/local/python2.7.3/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory

共有ライブラリの確認

$ ldd /usr/local/python2.7.3/bin/python
        libpython2.7.so.1.0 => not found
        libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003eaa000000)
        libdl.so.2 => /lib64/libdl.so.2 (0x0000003ea9c00000)
        libutil.so.1 => /lib64/libutil.so.1 (0x0000003eb6a00000)
        libm.so.6 => /lib64/libm.so.6 (0x0000003ea9800000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003ea9400000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003ea9000000)
libpython2.7.so.1.0 => not found

上記の状態の場合、ライブラリへのシンボリックリンクを/lib64配下に作成。

ln -s /usr/local/python2.7.3/lib/libpython2.7.so.1.0 /lib64/
8
8
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
8
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?