Results 1 to 4 of 4

Thread: Installing Python-dev fails

  1. #1

    Installing Python-dev fails

    I wanted to install PyCrypto as part of my PWK course work but I am meeting few problems.

    PyCrypto : http://www.amk.ca/python/code/crypto.html'

    However this itself is proving a pain as when i try to install PyCrpto my Kali box is crying with a Python.h not found error.
    root@kali:~/Downloads/pycrypto-2.6.1# python setup.py build
    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 -fwrapv -Wall -Wstrict-prototypes -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.7 -c src/MD2.c -o build/temp.linux-i686-2.7/src/MD2.o
    src/MD2.c:31:20: fatal error: Python.h: No such file or directory
    compilation terminated.
    error: command 'gcc' failed with exit status 1


    Google tells me that the above is because i need to install python-dev package. Now for some reason this package does not seem to be installed in the default package sources. It does not install . Anyone had the same issues?

    Downloads/pycrypto-2.6.1# apt-get install python2.7-dev
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following extra packages will be installed:
    libssl-dev libssl-doc
    The following NEW packages will be installed:
    libssl-dev libssl-doc python2.7-dev
    0 upgraded, 3 newly installed, 0 to remove and 3 not upgraded.
    Need to get 2,791 kB/25.2 MB of archives.
    After this operation, 35.6 MB of additional disk space will be used.
    Do you want to continue [Y/n]? y
    Err http://security.kali.org/kali-security/ kali/updates/main libssl-dev i386 1.0.1e-2+deb7u13
    404 Not Found
    Err http://security.kali.org/kali-security/ kali/updates/main libssl-doc all 1.0.1e-2+deb7u13
    404 Not Found
    Failed to fetch http://security.kali.org/kali-securi...b7u13_i386.deb 404 Not Found
    Failed to fetch http://security.kali.org/kali-securi...eb7u13_all.deb 404 Not Found
    E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

    I dont know how to point to an additional mirror as suggested in this forum and most importantly which mirror will have it . Post https://forums.kali.org/showthread.p...ght=python-dev

    I have wasted far too much lab time on this. Any help will be appreciated.

  2. #2
    Did you run 'apt-get update' first?
    What is your Kali version?
    What is the contents of '/etc/apt/source.lst' ?
    Whats the full output of the error (if you dont use [ CODE][ /CODE] tags it will compress the output).
    Whats your local mirror? (go here: http://http.kali.org/README.mirrorlist)
    This is a Kali-Linux support forum - not general IT/infosec help.

    Useful Commands: OS, Networking, Hardware, Wi-Fi
    Troubleshooting: Kali-Linux Installation, Repository, Wi-Fi Cards (Official Docs)
    Hardware: Recommended 802.11 Wireless Cards

    Documentation: http://docs.kali.org/ (Offline PDF version)
    Bugs Reporting & Tool Requests: https://bugs.kali.org/
    Kali Tool List, Versions & Man Pages: https://tools.kali.org/

  3. #3
    Did you run 'apt-get update' first?

    A - > Yes i did that but i see a failure

    Code:
     apt-get update 
    Get:1 http://http.kali.org kali Release.gpg [819 B]
    Get:2 http://security.kali.org kali/updates Release.gpg [819 B]
    Get:3 http://http.kali.org kali Release [21.1 kB]
    Err http://http.kali.org kali Release                      
      
    Get:4 http://security.kali.org kali/updates Release [11.0 kB]
    Err http://security.kali.org kali/updates Release
      
    Fetched 1,640 B in 2s (677 B/s)
    Reading package lists... Done
    W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://http.kali.org kali Release: The following signatures were invalid: KEYEXPIRED 1425567400 KEYEXPIRED 1425567400 KEYEXPIRED 1425567400
    
    W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://security.kali.org kali/updates Release: The following signatures were invalid: KEYEXPIRED 1425567400 KEYEXPIRED 1425567400 KEYEXPIRED 1425567400
    
    W: Failed to fetch http://http.kali.org/kali/dists/kali/Release  
    
    W: Failed to fetch http://security.kali.org/kali-security/dists/kali/updates/Release  
    
    W: Some index files failed to download. They have been ignored, or old ones used instead.
    What is your Kali version?
    A ->

    Code:
    root@kali:~/pwklab# cat /etc/issue
    Kali GNU/Linux 1.0.9 \n \l

    What is the contents of '/etc/apt/source.lst' ?
    A->

    Code:
    root@kali:~/pwklab# cat /etc/apt/sources.list
    # 
    
    #deb cdrom:[Debian GNU/Linux 7.0 _Kali_ - Official Snapshot i386 LIVE/INSTALL Binary 20141107-09:02]/ kali contrib main non-free
    
    #deb cdrom:[Debian GNU/Linux 7.0 _Kali_ - Official Snapshot i386 LIVE/INSTALL Binary 20141107-09:02]/ kali contrib main non-free
    
    deb http://http.kali.org/kali kali main non-free contrib
    deb-src http://http.kali.org/kali kali main non-free contrib
    
    ## Security updates
    deb http://security.kali.org/kali-security kali/updates main contrib non-free
    Whats the full output of the error (if you dont use [ CODE][ /CODE] tags it will compress the output).

    A-> Seems to me that a couple of dependent libraries libssl-dev & libssl-doc could not be installed.


    Whats your local mirror? (go here: http://http.kali.org/README.mirrorlist)

    A->
    Found 2 mirrors which handle this country (SG)

    http://ftp.yzu.edu.tw/Linux/kali/README (tw, prio 100)
    http://kali.cs.nctu.edu.tw/kali/README (tw, prio 100)

    Actually the solution previously mentioned in https://forums.kali.org/showthread.p...-found-in-repo also talks about pointing to the local mirror but i dont know how to apply it. Should I update my source.list with this mirror location? Can you help me with the syntax for doing so. I dont know exactly what parameters to be provided ( main/contrib/non-free etc) .

  4. #4
    You dont need to mess about altering your repos (trust me).

    Ahh haaaaa!
    You have "KEYEXPIRED" (as your using an older kali).
    Check here for the fix: https://forums.kali.org/showthread.p...ght=KEYEXPIRED
    This is a Kali-Linux support forum - not general IT/infosec help.

    Useful Commands: OS, Networking, Hardware, Wi-Fi
    Troubleshooting: Kali-Linux Installation, Repository, Wi-Fi Cards (Official Docs)
    Hardware: Recommended 802.11 Wireless Cards

    Documentation: http://docs.kali.org/ (Offline PDF version)
    Bugs Reporting & Tool Requests: https://bugs.kali.org/
    Kali Tool List, Versions & Man Pages: https://tools.kali.org/

Similar Threads

  1. installing python
    By i999gera in forum NetHunter General Questions
    Replies: 0
    Last Post: 2018-11-16, 08:02

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •