First, preface
There was a problem installing fabric on CentOS, first installed Pip, using PIP to execute the following command pip install
The following issues occur
[Plain]View PlainCopy
- [[email protected]/]$ sudo pip install fabric
- Requirement already satisfied (use--upgrade to upgrade): Fabric in/usr/lib/python2.6/site-packages/ Fabric-1.3.1-py2.6.egg
- Requirement already satisfied (use--upgrade to upgrade): ssh>=1.7.8 in/usr/lib/python2.6/site-packages/ Ssh-1.8.0-py2.6.egg (from Fabric)
- Downloading/unpacking pycrypto>=2.1,!=2.4 (from Ssh>=1.7.8->fabric)
- Running setup.py Egg_info for package Pycrypto
- Installing collected Packages:pycrypto
- Found existing Installation:pycrypto 2.0.1
- Uninstalling Pycrypto:
- Successfully uninstalled Pycrypto
- Running setup.py Install for Pycrypto
- Warning:gmp or Mpir library not found; Not building Crypto.publickey._fastmath.
- Building ' crypto.hash._md2 ' extension
- Gcc-pthread-fno-strict-aliasing-pipe-wall-wp,-d_fortify_source=2-fexceptions-fstack-protector--param= SSP-BUFFER-SIZE=4-M32-MARCH=I686-MTUNE=ATOM-FASYNCHRONOUS-UNWIND-TABLES-D_GNU_SOURCE-FPIC-FWRAPV-PIPE-WALL-WP, -d_fortify_source=2-fexceptions-fstack-protector--param=ssp-buffer-size=4-m32-march=i686-mtune=atom- fasynchronous-unwind-tables-d_gnu_source-fpic-fwrapv-fpic-std=c99-o3-fomit-frame-pointer-isrc/-I/usr/include/ Python2.6-c Src/md2.c-o BUILD/TEMP.LINUX-I686-2.6/SRC/MD2.O
- SRC/MD2.C:31:20: Error: Python.h: no file or directory
- src/md2.c:131: Error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' * ' token
- In file included from src/md2.c:147:
- SRC/HASH_TEMPLATE.C:48: Error: expected specifier-qualifier-list before ' Pyobject_head '
- SRC/HASH_TEMPLATE.C:59: Error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' pytypeobject '
- SRC/HASH_TEMPLATE.C: In the function ' Newalgobject ':
- SRC/HASH_TEMPLATE.C:69: Warning: Implicitly declaring function ' Pyobject_new '
- SRC/HASH_TEMPLATE.C:69: Error: expected expression before ' algobject '
- SRC/HASH_TEMPLATE.C: At the file level:
- SRC/HASH_TEMPLATE.C:76: Error: expected ') ' before ' * ' token
- SRC/HASH_TEMPLATE.C:91: Error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' * ' token
- SRC/HASH_TEMPLATE.C:110: Error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' * ' token
- src/hash_template.c:122: Error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' * ' token
- SRC/HASH_TEMPLATE.C:162: Error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' * ' token
- src/hash_template.c:188: Error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' * ' token
- SRC/HASH_TEMPLATE.C:190: Error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' alg_methods '
- src/hash_template.c:199: Error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' * ' token
- SRC/HASH_TEMPLATE.C:225: Error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' Algtype '
- src/hash_template.c:271: Error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' * ' token
- src/hash_template.c:304: Error: The type of the array element is not fully
- src/hash_template.c:305: Error: ' Pycfunction ' not declared (not inside function)
- src/hash_template.c:305: Error: expected '} ' before ' Alg_new '
- SRC/HASH_TEMPLATE.C: In the function ' INIT_MD2 ':
- src/hash_template.c:339: Error: ' Pyobject ' not declared (first use within this function)
- src/hash_template.c:339: Error: (even if multiple occurrences occur within a function, each undeclared identifier is in its
- src/hash_template.c:339: Error: The function inside is also reported only once. )
- src/hash_template.c:339: Error: ' m ' not declared (first use within this function)
- src/hash_template.c:351: Error: ' Algtype ' not declared (first use within this function)
- src/hash_template.c:351: Error: ' Pytype_type ' not declared (first use within this function)
- src/hash_template.c:352: Warning: Implicitly declaring function ' Py_initmodule '
- src/hash_template.c:356: Error: ' O ' is not declared (first use within this function)
- src/hash_template.c:356: Warning: Implicitly declaring function ' Pyint_fromlong '
- src/hash_template.c:356: Warning: Implicitly declaring function ' pydict_setitemstring '
- src/hash_template.c:356: Warning: Implicitly declaring function ' Pymodule_getdict '
- src/hash_template.c:356: Warning: Implicitly declaring function ' Py_decref '
- SRC/HASH_TEMPLATE.C:360: Warning: Implicitly declaring function ' pyerr_occurred '
- src/hash_template.c:361: Warning: Implicitly declaring function ' Py_fatalerror '
- Error:command ' gcc ' failed with exit status 1
- Complete output from command/usr/bin/python-c "Import setuptools;__file__= '/tmp/pip-build-root/pycrypto/setup.py '; EXEC (Compile (open (__file__). Read (). replace (' \ r \ n ', ' \ n '), __file__, ' exec ') "Install--record/tmp/ Pip-ai6cqr-record/install-record.txt--single-version-externally-managed:
- Running Install
- Running Build
- Running Build_py
- Running Build_ext
- Running Build_configure
- Warning:gmp or Mpir library not found; Not building Crypto.publickey._fastmath.
- Building ' crypto.hash._md2 ' extension
- Gcc-pthread-fno-strict-aliasing-pipe-wall-wp,-d_fortify_source=2-fexceptions-fstack-protector--param= SSP-BUFFER-SIZE=4-M32-MARCH=I686-MTUNE=ATOM-FASYNCHRONOUS-UNWIND-TABLES-D_GNU_SOURCE-FPIC-FWRAPV-PIPE-WALL-WP, -d_fortify_source=2-fexceptions-fstack-protector--param=ssp-buffer-size=4-m32-march=i686-mtune=atom- fasynchronous-unwind-tables-d_gnu_source-fpic-fwrapv-fpic-std=c99-o3-fomit-frame-pointer-isrc/-I/usr/include/ Python2.6-c Src/md2.c-o BUILD/TEMP.LINUX-I686-2.6/SRC/MD2.O
- SRC/MD2.C:31:20: Error: Python.h: no file or directory
- src/md2.c:131: Error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' * ' token
- In file included from src/md2.c:147:
- SRC/HASH_TEMPLATE.C:48: Error: expected specifier-qualifier-list before ' Pyobject_head '
- SRC/HASH_TEMPLATE.C:59: Error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' pytypeobject '
- SRC/HASH_TEMPLATE.C: In the function ' Newalgobject ':
- SRC/HASH_TEMPLATE.C:69: Warning: Implicitly declaring function ' Pyobject_new '
- SRC/HASH_TEMPLATE.C:69: Error: expected expression before ' algobject '
- SRC/HASH_TEMPLATE.C: At the file level:
- SRC/HASH_TEMPLATE.C:76: Error: expected ') ' before ' * ' token
- SRC/HASH_TEMPLATE.C:91: Error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' * ' token
- SRC/HASH_TEMPLATE.C:110: Error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' * ' token
- src/hash_template.c:122: Error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' * ' token
- SRC/HASH_TEMPLATE.C:162: Error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' * ' token
- src/hash_template.c:188: Error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' * ' token
- SRC/HASH_TEMPLATE.C:190: Error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' alg_methods '
- src/hash_template.c:199: Error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' * ' token
- SRC/HASH_TEMPLATE.C:225: Error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' Algtype '
- src/hash_template.c:271: Error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' * ' token
- src/hash_template.c:304: Error: The type of the array element is not fully
- src/hash_template.c:305: Error: ' Pycfunction ' not declared (not inside function)
- src/hash_template.c:305: Error: expected '} ' before ' Alg_new '
- SRC/HASH_TEMPLATE.C: In the function ' INIT_MD2 ':
- src/hash_template.c:339: Error: ' Pyobject ' not declared (first use within this function)
- src/hash_template.c:339: Error: (even if multiple occurrences occur within a function, each undeclared identifier is in its
- src/hash_template.c:339: Error: The function inside is also reported only once. )
- src/hash_template.c:339: Error: ' m ' not declared (first use within this function)
- src/hash_template.c:351: Error: ' Algtype ' not declared (first use within this function)
- src/hash_template.c:351: Error: ' Pytype_type ' not declared (first use within this function)
- src/hash_template.c:352: Warning: Implicitly declaring function ' Py_initmodule '
- src/hash_template.c:356: Error: ' O ' is not declared (first use within this function)
- src/hash_template.c:356: Warning: Implicitly declaring function ' Pyint_fromlong '
- src/hash_template.c:356: Warning: Implicitly declaring function ' pydict_setitemstring '
- src/hash_template.c:356: Warning: Implicitly declaring function ' Pymodule_getdict '
- src/hash_template.c:356: Warning: Implicitly declaring function ' Py_decref '
- SRC/HASH_TEMPLATE.C:360: Warning: Implicitly declaring function ' pyerr_occurred '
- src/hash_template.c:361: Warning: Implicitly declaring function ' Py_fatalerror '
- Error:command ' gcc ' failed with exit status 1
- ----------------------------------------
- Rolling back uninstall of Pycrypto
- Command/usr/bin/python-c "Import setuptools;__file__= '/tmp/pip-build-root/pycrypto/setup.py '; EXEC (Compile (open (_ _file__). Read (). replace (' \ r \ n ', ' \ n '), __file__, ' exec ') "Install--record/tmp/pip-ai6cqr-record/ Install-record.txt--single-version-externally-managed failed with error code 1 in/tmp/pip-build-root/pycrypto
- Storing complete log In/root/.pip/pip.log
Second Solution
The reason is that the Python dev is less
[Plain]View PlainCopy
- [email protected]/]$ sudo yum install Python-devel
SRC/MD2.C:31:20: Error: Python.h: no file or directory