One, dependent module
Pycrypto-the Python Cryptography Toolkit
Two
$ wget http://www.lag.net/paramiko/download/paramiko-1.7.6.tar.gz
$ wget http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.4.1.tar.gz
or wget http://pypi.python.org/packages/source/p/pycrypto/pycrypto-2.0.1.tar.gz#md5=277aa00f27cfbb08f21063f4beb6de59.
Third, installation
1, installation Pycrypto
- $ TAR-ZXVF pycrypto-2.0.1.tar.gz
- $ CD pycrypto-2.0.1
- $ python setup.py Build
- $ sudo python setup.py install
2, Installation Paramiko
- $ TAR-ZXVF paramiko-1.7.6.tar.gz
- $ CD paramiko-1.7.6
- $ python setup.py Build
- $ sudo python setup.py install
Iv. possible problems and solutions "based on Centos,ubuntu,python 2.7.3"
If the following error occurred while installing pycrypto2.0.1
command ' GCC ' failed with exit status 1
View plain <strong>[/pycrypto-2.0.1]$ sudo python setup.py build running build running build_py running Build_ext BU Ilding ' Crypto.Hash.MD2 ' extension gcc-pthread-fno-strict-aliasing-dndebug-o2-g-pipe-wall-wp,-d_fortify_source=2- fexceptions-fstack-protector--param=ssp-buffer-size=4-m64-mtune=generic-d_gnu_source-fpic-fpic-isrc/-I/usr/ Include/python2.4-c Src/md2.c-o BUILD/TEMP.LINUX-X86_64-2.4/SRC/MD2.O Unable to execute gcc:no such file or directory E Rror:command ' gcc ' failed with exit status 1</strong> solution 1:
May be missing Pyton-dev installation package causes
CentOS System
- </pre> <pre name= "code" class= "HTML" > Yum list | grep Python-dev
- $ yum-y Install python-dev*"requires root permission to execute"
Ubuntu System
- $sudo Apt-get Install Python-dev
Once executed, the reinstallation succeeds.
Solution 2:
If solution 1 does not resolve the issue, it may be that "GCC" is not installed or is no longer in the path
$ Whereis gcc"Check gcc"
$ echo $PATH "Check if GCC is in PATH"
If "GCC" is not installed, execute the following command
Centos:
$ Yum List | grep gcc
$ sudo yum install-y gcc.x86_64
Ubuntu
$ sudo apt-get install gcc
After execution, reinstall.
Python installation Paramiko module