Install the python library module in linux
Today, we need to deploy a python script on an online server, which uses MySQLdb and various attempts to download source code (various dependent libraries are incompatible with each other ), get/yum (this linux is so pure that neither of them can be used) installation, wget downloading the rpm package cannot connect to the Internet, and both failed, in addition, libmysqlclient-dev and MySQL-python are not easy to find. They also have many versions, which are incompatible with each other ..
The available version is
Ftp://rpmfind.net/linux/centos/6.6/ OS /x86_64/Packages/MySQL-python-1.2.3-0.3.c1.1.el6.x86_64.rpm
And
Http://archive.debian.net/zh-cn/etch/amd64/libmysqlclient15-dev/download
The two software packages wget to one server, use alien to convert the deb format to the rpm format, and then send the two rpm packages rsync-avzP to the online server, and then follow the sequence rpm-ivh, OK
Then findRedis-pythonNo. This time, the same method will not work. Installing redis-py depends on redis and relying on rpm-helper to rely on system-units ...... endless.
In addition, none of the RPMs obtained from rpmfind succeeded, either the dependent library or the version> =.
There are two ways to install the software. If there is no other way to install the software, you must compile the source code:
Download redis-py-2.7.1.tar.gz:
Http://download.chinaunix.net/down.php? Id = 44261 & ResourceID = 13387 & site = 1
Tar-xvf, and then cd into make, right, make install is still correct? Try to import redis in python. Is that correct ?! Well, it seems we have done it.
Use alien tool to convert deb format to rpm format
Alien_8.87.tar.gz
Download alien_8.87.tar.gz
[Root @ mysqlnode2 ~] # Wget http://ftp.de.debian.org/debian/pool/main/a/alien/alien_8.87.tar.gz
[Root @ mysqlnode2 ~] # Tar zxvf alien_8.87.tar.gz
[Root @ mysqlnode2 ~] # Cd alien
[Root @ mysqlnode2 alien] # perl Makefile. PL
[Root @ mysqlnode2 alien] # make
[Root @ mysqlnode2 alien] # make install
Convert libnet0-dev_1.0.2a-7_i386.deb to libnet0-dev-1.0.2a-8.i386.rpm
[Root @ mysqlnode2 ~] # Alien-r libnet0-dev_1.0.2a-7_i386.deb
Warning: Skipping conversion of scripts in package libnet0-dev: postinst prerm
Warning: Use the -- scripts parameter to include the scripts.
Libnet0-dev-1.0.2a-8.i386.rpm (generated)
Install the rpm package
[Root @ mysqlnode2 ~] # Rpm-ivh libnet0-dev-1.0.2a-8.i386.rpm