compilation error : command 'gcc' failed with exit status 1 at Amazon Linux
I love rainbowstream ! I have experienced following error at installation
-bash-4.1$ pip install rainbowstream Collecting rainbowstream /usr/local/lib/python2.6/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:79: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning Using cached rainbowstream-1.2.7.tar.gz Requirement already satisfied (use --upgrade to upgrade): python-dateutil in /usr/lib/python2.6/site-packages (from rainbowstream) Requirement already satisfied (use --upgrade to upgrade): arrow in /usr/local/lib/python2.6/site-packages (from rainbowstream) Requirement already satisfied (use --upgrade to upgrade): requests in /usr/lib/python2.6/site-packages (from rainbowstream) Requirement already satisfied (use --upgrade to upgrade): pyfiglet in /usr/local/lib/python2.6/site-packages (from rainbowstream) Requirement already satisfied (use --upgrade to upgrade): twitter in /usr/local/lib/python2.6/site-packages (from rainbowstream) Collecting Pillow (from rainbowstream) Using cached Pillow-2.8.1.tar.gz Requirement already satisfied (use --upgrade to upgrade): PySocks in /usr/local/lib/python2.6/site-packages (from rainbowstream) Requirement already satisfied (use --upgrade to upgrade): six in /usr/lib/python2.6/site-packages (from python-dateutil->rainbowstream) Installing collected packages: Pillow, rainbowstream Running setup.py install for Pillow Complete output from command /usr/bin/python2.6 -c "import setuptools, tokenize;file='/tmp/pip-build-dWTFcV/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-Hf0hPt-record/install-record.txt --single-version-externally-managed --compile: Single threaded build, not installing mp_compile: 1 processes running install running build running build_py creating build creating build/lib.linux-x86_64-2.6 creating build/lib.linux-x86_64-2.6/PIL copying PIL/GimpPaletteFile.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImageWin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/FontFile.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImageDraw2.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/MicImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/McIdasImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/IcnsImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImageFilter.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/IcoImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/TiffTags.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/WebPImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImageQt.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ExifTags.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/PalmImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/MpoImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/WalImageFile.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/PixarImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/Hdf5StubImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImagePath.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImageGrab.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/GbrImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImageShow.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/JpegImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/IptcImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/MpegImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ContainerIO.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/PyAccess.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImageColor.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/EpsImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/GribStubImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/PngImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/GdImageFile.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImageStat.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/TgaImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/BufrStubImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/PaletteFile.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImageCms.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/SunImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImageOps.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/Image.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImageFileIO.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/PpmImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/TiffImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImageMath.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/OleFileIO.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/GifImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/PSDraw.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/PdfImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/WmfImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/FitsStubImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/MspImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/DcxImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImageDraw.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/PcxImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImageFont.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/TarIO.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImageFile.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/FpxImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImagePalette.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/XpmImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/init.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImageChops.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImageEnhance.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/GimpGradientFile.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImageSequence.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/BdfFontFile.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/PsdImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/SpiderImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/_binary.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/FliImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImageMorph.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImageTransform.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/PcfFontFile.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImageMode.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/BmpImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/PcdImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImtImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/CurImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/SgiImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/_util.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/XVThumbImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/JpegPresets.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/Jpeg2KImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/ImageTk.py -> build/lib.linux-x86_64-2.6/PIL copying PIL/XbmImagePlugin.py -> build/lib.linux-x86_64-2.6/PIL running egg_info writing Pillow.egg-info/PKG-INFO writing top-level names to Pillow.egg-info/top_level.txt writing dependency_links to Pillow.egg-info/dependency_links.txt warning: manifest_maker: standard file '-c' not found reading manifest file 'Pillow.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching 'LICENSE' under directory 'docs' writing manifest file 'Pillow.egg-info/SOURCES.txt' copying PIL/OleFileIO-README.md -> build/lib.linux-x86_64-2.6/PIL running build_ext building 'PIL._imaging' extension creating build/temp.linux-x86_64-2.6/libImaging gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -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 -fwrapv -fPIC -I/tmp/pip-build-dWTFcV/Pillow/libImaging -I/usr/include -I/usr/local/include -I/usr/include/python2.6 -c _imaging.c -o build/temp.linux-x86_64-2.6/_imaging.o _imaging.c:76:20: fatal error: Python.h: No such file or directory #include "Python.h" ^ compilation terminated. error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python2.6 -c "import setuptools, tokenize;__file__='/tmp/pip-build-dWTFcV/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Hf0hPt-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-dWTFcV/Pillow
Hi, which distro is your Linux ? I think you don't have the package python-dev. With debian-based distro it can be installed with sudo apt-get install python-dev
Thank you for your reply.
My disro is as below and I had installed with "sudo yum install python-devel" after your advise and experienced same problem.
NAME="Amazon Linux AMI" VERSION="2014.09" ID="amzn" ID_LIKE="rhel fedora" VERSION_ID="2014.09" PRETTY_NAME="Amazon Linux AMI 2014.09"
Seems like you haven't install gcc in your vps
Hi,
I had already installed gcc and tried
" sudo yum install glibc-devel glibc-headers”
it seems to change the result a little bit
gcc -pthread -shared build/temp.linux-x86_64-2.6/_imaging.o build/temp.linux-x86_64-2.6/decode.o build/temp.linux-x86_64-2.6/encode.o build/temp.linux-x86_64-2.6/map.o build/temp.linux-x86_64-2.6/display.o build/temp.linux-x86_64-2.6/outline.o build/temp.linux-x86_64-2.6/path.o build/temp.linux-x86_64-2.6/libImaging/Access.o build/temp.linux-x86_64-2.6/libImaging/AlphaComposite.o build/temp.linux-x86_64-2.6/libImaging/Resample.o build/temp.linux-x86_64-2.6/libImaging/Bands.o build/temp.linux-x86_64-2.6/libImaging/BitDecode.o build/temp.linux-x86_64-2.6/libImaging/Blend.o build/temp.linux-x86_64-2.6/libImaging/Chops.o build/temp.linux-x86_64-2.6/libImaging/Convert.o build/temp.linux-x86_64-2.6/libImaging/ConvertYCbCr.o build/temp.linux-x86_64-2.6/libImaging/Copy.o build/temp.linux-x86_64-2.6/libImaging/Crc32.o build/temp.linux-x86_64-2.6/libImaging/Crop.o build/temp.linux-x86_64-2.6/libImaging/Dib.o build/temp.linux-x86_64-2.6/libImaging/Draw.o build/temp.linux-x86_64-2.6/libImaging/Effects.o build/temp.linux-x86_64-2.6/libImaging/EpsEncode.o build/temp.linux-x86_64-2.6/libImaging/File.o build/temp.linux-x86_64-2.6/libImaging/Fill.o build/temp.linux-x86_64-2.6/libImaging/Filter.o build/temp.linux-x86_64-2.6/libImaging/FliDecode.o build/temp.linux-x86_64-2.6/libImaging/Geometry.o build/temp.linux-x86_64-2.6/libImaging/GetBBox.o build/temp.linux-x86_64-2.6/libImaging/GifDecode.o build/temp.linux-x86_64-2.6/libImaging/GifEncode.o build/temp.linux-x86_64-2.6/libImaging/HexDecode.o build/temp.linux-x86_64-2.6/libImaging/Histo.o build/temp.linux-x86_64-2.6/libImaging/JpegDecode.o build/temp.linux-x86_64-2.6/libImaging/JpegEncode.o build/temp.linux-x86_64-2.6/libImaging/LzwDecode.o build/temp.linux-x86_64-2.6/libImaging/Matrix.o build/temp.linux-x86_64-2.6/libImaging/ModeFilter.o build/temp.linux-x86_64-2.6/libImaging/MspDecode.o build/temp.linux-x86_64-2.6/libImaging/Negative.o build/temp.linux-x86_64-2.6/libImaging/Offset.o build/temp.linux-x86_64-2.6/libImaging/Pack.o build/temp.linux-x86_64-2.6/libImaging/PackDecode.o build/temp.linux-x86_64-2.6/libImaging/Palette.o build/temp.linux-x86_64-2.6/libImaging/Paste.o build/temp.linux-x86_64-2.6/libImaging/Quant.o build/temp.linux-x86_64-2.6/libImaging/QuantOctree.o build/temp.linux-x86_64-2.6/libImaging/QuantHash.o build/temp.linux-x86_64-2.6/libImaging/QuantHeap.o build/temp.linux-x86_64-2.6/libImaging/PcdDecode.o build/temp.linux-x86_64-2.6/libImaging/PcxDecode.o build/temp.linux-x86_64-2.6/libImaging/PcxEncode.o build/temp.linux-x86_64-2.6/libImaging/Point.o build/temp.linux-x86_64-2.6/libImaging/RankFilter.o build/temp.linux-x86_64-2.6/libImaging/RawDecode.o build/temp.linux-x86_64-2.6/libImaging/RawEncode.o build/temp.linux-x86_64-2.6/libImaging/Storage.o build/temp.linux-x86_64-2.6/libImaging/SunRleDecode.o build/temp.linux-x86_64-2.6/libImaging/TgaRleDecode.o build/temp.linux-x86_64-2.6/libImaging/Unpack.o build/temp.linux-x86_64-2.6/libImaging/UnpackYCC.o build/temp.linux-x86_64-2.6/libImaging/UnsharpMask.o build/temp.linux-x86_64-2.6/libImaging/XbmDecode.o build/temp.linux-x86_64-2.6/libImaging/XbmEncode.o build/temp.linux-x86_64-2.6/libImaging/ZipDecode.o build/temp.linux-x86_64-2.6/libImaging/ZipEncode.o build/temp.linux-x86_64-2.6/libImaging/TiffDecode.o build/temp.linux-x86_64-2.6/libImaging/Incremental.o build/temp.linux-x86_64-2.6/libImaging/Jpeg2KDecode.o build/temp.linux-x86_64-2.6/libImaging/Jpeg2KEncode.o build/temp.linux-x86_64-2.6/libImaging/BoxBlur.o -L/usr/lib -L/lib64 -L/usr/lib64 -L/usr/local/lib -L/usr/lib64 -ljpeg -lpython2.6 -o build/lib.linux-x86_64-2.6/PIL/_imaging.so collect2: fatal error: cannot find 'ld' compilation terminated. error: command 'gcc' failed with exit status 1
same problem with v3n0m scanner