** Sakura VPS 1GB ** * Notice of the end of the trial period * has arrived, so I added ** Python2.7 ** for a moment. The purpose is ** parsing social data **! ** Python ** is one of the royal roads for data mining, so it's a good idea to experience it. * (・ ∀ ・)! !! *
[funya@hogex ~]$ cd /usr/local/bin/
[funya@hogex bin]$ ls
[funya@hogex ~]$ sudo yum install gcc
[funya@hogex bin]$ sudo yum install libjpeg-devel
[funya@hogex bin]$ sudo yum install zlib-devel
[funya@hogex bin]$ sudo wget http://www.sqlite.org/sqlite-autoconf-3070500.tar.gz
[funya@hogex bin]$ sudo tar xvfz sqlite-autoconf-3070500.tar.gz
By the way, it's easy because you can erase all commands with CTRL + U.
[funya@hogex bin]$ cd sqlite-autoconf-3070500
[funya@hogex bin]$ sudo ./configure
[funya@hogex bin]$ sudo make
[funya@hogex bin]$ sudo make install
[funya@hogex bin]$ sudo wget http://www.python.org/ftp/python/2.7/Python-2.7.tar.bz2
[funya@hogex bin]$ sudo tar xjvf Python-2.7.tar.bz2
[funya@hogex bin]$ cd Python-2.7
-bash: cd: Python-2.7:No permission
[funya@hogex bin]$ sudo chmod a+rwx Python-2.7
[funya@hogex bin]$ ./configure --enable-shared
[funya@hogex bin]$ sudo yum -y install httpd-devel
[funya@hogex bin]$ sudo wget http://modwsgi.googlecode.com/files/mod_wsgi-3.3.tar.gz
[funya@hogex bin]$ sudo tar xvfz mod_wsgi-3.3.tar.gz
[funya@hogex bin]$ cd mod_wsgi-3.3
[funya@hogex mod_wsgi-3.3]$ sudo ./configure --with-apxs=/usr/sbin/apxs --with-python=/usr/local/bin/python
checking Apache version... 2.2.15
/usr/local/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
/usr/local/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
/usr/local/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
/usr/local/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
/usr/local/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
/usr/local/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
/usr/local/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
/usr/local/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
/usr/local/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
/usr/local/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
configure: creating ./config.status
config.status: creating Makefile
It was an error. Investigation.
[funya@hogex bin]$ ldd python2.7
Hmmm, the file seems to have been created. This is a symbolic link that is always used.
[funya@hogex lib64]$ sudo ln /usr/local/bin/Python-2.7/libpython2.7.so.1.0 libpython2.7.so.1.0
[funya@hogex mod_wsgi-3.3]$ sudo ./configure --with-apxs=/usr/sbin/apxs --with-python=/usr/local/bin/python
checking Apache version... 2.2.15
configure: creating ./config.status
config.status: creating Makefile
[funya@hogex mod_wsgi-3.3]$ sudo make
[funya@hogex mod_wsgi-3.3]$ sudo make install
[funya@hogex bin]$ python -V
Python 2.7
[funya@hogex bin]$ sudo python
Python 2.6.6 (r266:84292, Feb 22 2013, 00:00:18)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
>>>
It worked for the time being! Let's finish today ☆ Mi
ref) 1. http://www.kzfmix.com/sakura/python.html ref) 2. http://itpro.nikkeibp.co.jp/article/COLUMN/20060228/231200/ ref) 3. http://homepage3.nifty.com/nasunu-i/LinuxBeginner/Permission.htm ref) 4. http://memo.yomukaku.net/entries/jbRkQkq
tip) 1. $ ll for detailed information about the file tip) 2. tar xjvf Python_hogehoge.bz2 tip) 3. Press CTRL + U to erase all commands
Recommended Posts