0xInfection / TIDoS-Framework

The Offensive Manual Web Application Penetration Testing Framework.
GNU General Public License v3.0
1.78k stars 392 forks source link

Could someone please direct me failure to wheel for MySQL-python (setup.py) ... error #93

Closed ZAKSSS-cloud closed 3 years ago

ZAKSSS-cloud commented 4 years ago
pip2 install -r requirements.txt DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Requirement already satisfied: sslyze in /home/zaksss/.local/lib/python2.7/site-packages (from -r requirements.txt (line 1)) (1.4.3) Requirement already satisfied: tldextract in /home/zaksss/.local/lib/python2.7/site-packages (from -r requirements.txt (line 2)) (2.2.2) Requirement already satisfied: lxml in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 3)) (4.4.1) Requirement already satisfied: pillow in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 4)) (6.2.0) Requirement already satisfied: scapy in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 5)) (2.3.1) Requirement already satisfied: pexpect in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 6)) (4.6.0) Requirement already satisfied: idna in /home/zaksss/.local/lib/python2.7/site-packages (from -r requirements.txt (line 7)) (2.8) Requirement already satisfied: bs4 in /home/zaksss/.local/lib/python2.7/site-packages (from -r requirements.txt (line 8)) (0.0.1) Requirement already satisfied: six in /home/zaksss/.local/lib/python2.7/site-packages (from -r requirements.txt (line 9)) (1.13.0) Requirement already satisfied: tld in /usr/local/lib/python2.7/dist-packages/tld-0.9-py2.7.egg (from -r requirements.txt (line 10)) (0.9) Requirement already satisfied: shodan in /usr/local/lib/python2.7/dist-packages/shodan-1.8.1-py2.7.egg (from -r requirements.txt (line 11)) (1.8.1) Requirement already satisfied: requests in /usr/local/lib/python2.7/dist-packages/requests-2.19.1-py2.7.egg (from -r requirements.txt (line 12)) (2.19.1) Requirement already satisfied: python-nmap in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 13)) (0.6.1) Requirement already satisfied: google in /usr/local/lib/python2.7/dist-packages/google-2.0.1-py2.7.egg (from -r requirements.txt (line 14)) (2.0.1) Requirement already satisfied: emailprotectionslib in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 15)) (0.8.3) Requirement already satisfied: builtwith in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 16)) (1.3.3) Requirement already satisfied: mechanize in /usr/local/lib/python2.7/dist-packages/mechanize-0.3.6-py2.7.egg (from -r requirements.txt (line 17)) (0.3.6) Processing /home/zaksss/.cache/pip/wheels/4f/10/3f/4930effd0320769375b5094e279cb0e4a4c10a7e5811b58f8a/mysql-0.0.2-cp27-none-any.whl Requirement already satisfied: mysql-connector-python-rf in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 19)) (2.2.2) Requirement already satisfied: ptyprocess in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 20)) (0.6.0) Requirement already satisfied: dnslib in /home/zaksss/.local/lib/python2.7/site-packages (from -r requirements.txt (line 21)) (0.9.10) Requirement already satisfied: enum34; python_version < "3.4" in /home/zaksss/.local/lib/python2.7/site-packages (from sslyze->-r requirements.txt (line 1)) (1.1.6) Requirement already satisfied: typing; python_version < "3.5" in /home/zaksss/.local/lib/python2.7/site-packages (from sslyze->-r requirements.txt (line 1)) (3.7.4.1) Requirement already satisfied: cryptography==2.2.2 in /home/zaksss/.local/lib/python2.7/site-packages (from sslyze->-r requirements.txt (line 1)) (2.2.2) Requirement already satisfied: tls-parser<1.3.0,>=1.2.0 in /home/zaksss/.local/lib/python2.7/site-packages (from sslyze->-r requirements.txt (line 1)) (1.2.1) Requirement already satisfied: nassl<1.2.0,>=1.1.0 in /home/zaksss/.local/lib/python2.7/site-packages (from sslyze->-r requirements.txt (line 1)) (1.1.3) Requirement already satisfied: setuptools in /usr/local/lib/python2.7/dist-packages (from tldextract->-r requirements.txt (line 2)) (42.0.2) Requirement already satisfied: requests-file>=1.4 in /home/zaksss/.local/lib/python2.7/site-packages (from tldextract->-r requirements.txt (line 2)) (1.4.3) Requirement already satisfied: beautifulsoup4 in /usr/lib/python2.7/dist-packages (from bs4->-r requirements.txt (line 8)) (4.8.0) Requirement already satisfied: click in /usr/lib/python2.7/dist-packages (from shodan->-r requirements.txt (line 11)) (7.0) Requirement already satisfied: click-plugins in /usr/local/lib/python2.7/dist-packages/click_plugins-1.1.1-py2.7.egg (from shodan->-r requirements.txt (line 11)) (1.1.1) Requirement already satisfied: colorama in /usr/lib/python2.7/dist-packages (from shodan->-r requirements.txt (line 11)) (0.3.7) Requirement already satisfied: XlsxWriter in /usr/local/lib/python2.7/dist-packages/XlsxWriter-1.2.7-py2.7.egg (from shodan->-r requirements.txt (line 11)) (1.2.7) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python2.7/dist-packages (from requests->-r requirements.txt (line 12)) (3.0.4) Requirement already satisfied: urllib3<1.24,>=1.21.1 in /usr/local/lib/python2.7/dist-packages/urllib3-1.23-py2.7.egg (from requests->-r requirements.txt (line 12)) (1.23) Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python2.7/dist-packages (from requests->-r requirements.txt (line 12)) (2018.8.24) Requirement already satisfied: html5lib>=0.999999999 in /usr/lib/python2.7/dist-packages (from mechanize->-r requirements.txt (line 17)) (1.0.1) Collecting MySQL-python Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip Requirement already satisfied: cffi>=1.7; platform_python_implementation != "PyPy" in /home/zaksss/.local/lib/python2.7/site-packages (from cryptography==2.2.2->sslyze->-r requirements.txt (line 1)) (1.13.2) Requirement already satisfied: asn1crypto>=0.21.0 in /home/zaksss/.local/lib/python2.7/site-packages (from cryptography==2.2.2->sslyze->-r requirements.txt (line 1)) (1.2.0) Requirement already satisfied: ipaddress; python_version < "3" in /home/zaksss/.local/lib/python2.7/site-packages (from cryptography==2.2.2->sslyze->-r requirements.txt (line 1)) (1.0.23) Requirement already satisfied: pycparser in /home/zaksss/.local/lib/python2.7/site-packages (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography==2.2.2->sslyze->-r requirements.txt (line 1)) (2.19) Building wheels for collected packages: MySQL-python Building wheel for MySQL-python (setup.py) ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0hNL0k/MySQL-python/setup.py'"'"'; file='"'"'/tmp/pip-install-0hNL0k/MySQL-python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-Xa4u21 --python-tag cp27
cwd: /tmp/pip-install-0hNL0k/MySQL-python/
Complete output (34 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/init.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-2.7/MySQLdb
creating build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/init.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-07FOaN/python2.7-2.7.17=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Dversion_info=(1,2,5,'final',1) -Dversion=1.2.5 -I/usr/include/mariadb -I/usr/include/mariadb/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o
In file included from _mysql.c:44:
/usr/include/mariadb/my_config.h:3:2: warning: #warning This file should not be included by clients, include only [-Wcpp]
3
#warning This file should not be included by clients, include only ^~~
_mysql.c: In function ‘_mysql_ConnectionObject_ping’:
_mysql.c:2005:41: error: ‘MYSQL’ {aka ‘struct st_mysql’} has no member named ‘reconnect’
2005
if ( reconnect != -1 ) self->connection.reconnect = reconnect; ^ error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
ERROR: Failed building wheel for MySQL-python Running setup.py clean for MySQL-python Failed to build MySQL-python Installing collected packages: MySQL-python, mysql Running setup.py install for MySQL-python ...error ERROR: Command errored out with exit status 1: command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0hNL0k/MySQL-python/setup.py'"'"'; file='"'"'/tmp/pip-install-0hNL0k/MySQL-python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-MKk4Nl/install-record.txt --single-version-externally-managed --compile
cwd: /tmp/pip-install-0hNL0k/MySQL-python/ Complete output (34 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/init.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-2.7/MySQLdb
creating build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/init.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-07FOaN/python2.7-2.7.17=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Dversion_info=(1,2,5,'final',1) -Dversion=1.2.5 -I/usr/include/mariadb -I/usr/include/mariadb/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o
In file included from _mysql.c:44:
/usr/include/mariadb/my_config.h:3:2: warning: #warning This file should not be included by clients, include only [-Wcpp]
3
#warning This file should not be included by clients, include only ^~~
_mysql.c: In function ‘_mysql_ConnectionObject_ping’:
_mysql.c:2005:41: error: ‘MYSQL’ {aka ‘struct st_mysql’} has no member named ‘reconnect’
2005
if ( reconnect != -1 ) self->connection.reconnect = reconnect; ^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0hNL0k/MySQL-python/setup.py'"'"'; file='"'"'/tmp/pip-install-0hNL0k/MySQL-python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-MKk4Nl/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

Jflye commented 4 years ago

I get the same in Kali, "Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-UHdVni/MYSQL-python/"

Jflye commented 4 years ago

Oh, I fixed it with 'python -m pip install --upgrade pip setuptools wheel' and then I ran 'pip install -r requirements.txt'

tanujjane commented 4 years ago

Use

pip3 install -r requirements.txt

OR

vi dependencies

Change

pip2 install mysql to pip3 install mysql