** Sakura VPS 1 Go ** * L'avis de fin de la période d'essai * est arrivé, j'ai donc ajouté ** Python2.7 ** pendant un moment. Le but est ** l'analyse des données sociales **! ** Python ** est l'une des routes royales pour l'exploration de données, alors faisons-en l'expérience. * (・ ∀ ・)! !! *
[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
Au fait, c'est facile car vous pouvez effacer toutes les commandes avec 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:Aucune autorisation
[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
C'était une erreur. Enquête.
[funya@hogex bin]$ ldd python2.7
Hmmm, le fichier semble avoir été créé. C'est le lien symbolique habituel à chaque fois.
[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
>>>
Cela a fonctionné pour le moment! Finissons aujourd'hui ☆ 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
astuce) 1. $ ll pour des informations détaillées sur le fichier tip) 2. tar xjvf Python_hogehoge.bz2 astuce) 3. Appuyez sur CTRL + U pour effacer toutes les commandes
Recommended Posts