zardus / ctf-tools

Some setup scripts for security research tools.
BSD 3-Clause "New" or "Revised" License
8.52k stars 1.89k forks source link

Unicorn install crashing and burning under Ubuntu 14.04 Trusty (LTS) #128

Open raildex1 opened 7 years ago

raildex1 commented 7 years ago

ly and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning Downloading https://github.com/aquynh/capstone/archive/next.zip /root/.virtualenvs/ctftools/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning Requirement already up-to-date: pip in /root/.virtualenvs/ctftools/lib/python2.7/site-packages (from -r ./requirements.txt (line 1)) Requirement already up-to-date: pycparser in /root/.virtualenvs/ctftools/lib/python2.7/site-packages (from -r ./requirements.txt (line 2)) Requirement already up-to-date: psutil>=3.1.0 in /root/.virtualenvs/ctftools/lib/python2.7/site-packages (from -r ./requirements.txt (line 3)) Requirement already up-to-date: python-ptrace>=0.8 in /root/.virtualenvs/ctftools/lib/python2.7/site-packages (from -r ./requirements.txt (line 4)) Requirement already up-to-date: pyelftools in /root/.virtualenvs/ctftools/lib/python2.7/site-packages (from -r ./requirements.txt (line 5)) Requirement already up-to-date: isort in /root/.virtualenvs/ctftools/lib/python2.7/site-packages (from -r ./requirements.txt (line 6)) Requirement already up-to-date: six in /root/.virtualenvs/ctftools/lib/python2.7/site-packages (from -r ./requirements.txt (line 7)) Requirement already up-to-date: future in /root/.virtualenvs/ctftools/lib/python2.7/site-packages (from -r ./requirements.txt (line 8)) Requirement already up-to-date: ROPgadget in /root/.virtualenvs/ctftools/lib/python2.7/site-packages (from -r ./requirements.txt (line 9)) Requirement already up-to-date: unicorn>=1.0.0 in /root/.virtualenvs/ctftools/lib/python2.7/site-packages (from -r ./requirements.txt (line 10)) Installing collected packages: capstone Found existing installation: capstone 4.0.0rc1 Uninstalling capstone-4.0.0rc1: Successfully uninstalled capstone-4.0.0rc1 Running setup.py install for capstone: started Running setup.py install for capstone: finished with status 'done' Successfully installed capstone-4.0.0rc1

Installing collected packages: unicorn Running setup.py install for unicorn Building C extensions cd qemu && \ ./configure --cc="cc" --extra-cflags="-DUNICORN_HAS_X86 -DUNICORN_HAS_ARM -DUNICORN_HAS_M68K -DUNICORN_HAS_ARM64 -DUNICORN_HAS_MIPS -DUNICORN_HAS_MIPSEL -DUNICORN_HAS_MIPS64 -DUNICORN_HAS_MIPS64EL -DUNICORN_HAS_SPARC -fPIC -fvisibility=hidden" --target-list="x86_64-softmmu, arm-softmmu, m68k-softmmu, aarch64-softmmu, mips-softmmu, mipsel-softmmu, mips64-softmmu, mips64el-softmmu, sparc-softmmu,sparc64-softmmu,"

ERROR: Cannot use 'python', Python 2.4 or later is required.
       Note that Python 3 or later is not yet supported.
       Use --python=/path/to/python to specify a supported Python.

make: *** [qemu/config-host.h-timestamp] Error 1
error: [Errno 2] No such file or directory: 'libunicorn.so'
Complete output from command /root/.virtualenvs/ctftools3/bin/python3 -c "import setuptools, tokenize;__file__='/root/.virtualenvs/ctftools3/build/unicorn/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-nut9ondu-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/.virtualenvs/ctftools3/include/site/python3.4:
running install

running build

Building C extensions

cd qemu && \

./configure --cc="cc" --extra-cflags="-DUNICORN_HAS_X86 -DUNICORN_HAS_ARM -DUNICORN_HAS_M68K -DUNICORN_HAS_ARM64 -DUNICORN_HAS_MIPS -DUNICORN_HAS_MIPSEL -DUNICORN_HAS_MIPS64 -DUNICORN_HAS_MIPS64EL -DUNICORN_HAS_SPARC -fPIC -fvisibility=hidden" --target-list="x86_64-softmmu, arm-softmmu, m68k-softmmu, aarch64-softmmu, mips-softmmu, mipsel-softmmu, mips64-softmmu, mips64el-softmmu, sparc-softmmu,sparc64-softmmu,"

ERROR: Cannot use 'python', Python 2.4 or later is required.

   Note that Python 3 or later is not yet supported.

   Use --python=/path/to/python to specify a supported Python.

make: *** [qemu/config-host.h-timestamp] Error 1

error: [Errno 2] No such file or directory: 'libunicorn.so'


Cleaning up... Command /root/.virtualenvs/ctftools3/bin/python3 -c "import setuptools, tokenize;file='/root/.virtualenvs/ctftools3/build/unicorn/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-nut9ondu-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/.virtualenvs/ctftools3/include/site/python3.4 failed with error code 1 in /root/.virtualenvs/ctftools3/build/unicorn Storing debug log for failure in /root/.pip/pip.log TOOLS | unicorn | INSTALL FAILED

Installing collected packages: unicorn Running setup.py install for unicorn Building C extensions cd qemu && \ ./configure --cc="cc" --extra-cflags="-DUNICORN_HAS_X86 -DUNICORN_HAS_ARM -DUNICORN_HAS_M68K -DUNICORN_HAS_ARM64 -DUNICORN_HAS_MIPS -DUNICORN_HAS_MIPSEL -DUNICORN_HAS_MIPS64 -DUNICORN_HAS_MIPS64EL -DUNICORN_HAS_SPARC -fPIC -fvisibility=hidden" --target-list="x86_64-softmmu, arm-softmmu, m68k-softmmu, aarch64-softmmu, mips-softmmu, mipsel-softmmu, mips64-softmmu, mips64el-softmmu, sparc-softmmu,sparc64-softmmu,"

ERROR: Cannot use 'python', Python 2.4 or later is required.
       Note that Python 3 or later is not yet supported.
       Use --python=/path/to/python to specify a supported Python.

make: *** [qemu/config-host.h-timestamp] Error 1
error: [Errno 2] No such file or directory: 'libunicorn.so'
Complete output from command /root/.virtualenvs/ctftools3/bin/python3 -c "import setuptools, tokenize;__file__='/root/.virtualenvs/ctftools3/build/unicorn/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-nut9ondu-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/.virtualenvs/ctftools3/include/site/python3.4:
running install

running build

Building C extensions

cd qemu && \

./configure --cc="cc" --extra-cflags="-DUNICORN_HAS_X86 -DUNICORN_HAS_ARM -DUNICORN_HAS_M68K -DUNICORN_HAS_ARM64 -DUNICORN_HAS_MIPS -DUNICORN_HAS_MIPSEL -DUNICORN_HAS_MIPS64 -DUNICORN_HAS_MIPS64EL -DUNICORN_HAS_SPARC -fPIC -fvisibility=hidden" --target-list="x86_64-softmmu, arm-softmmu, m68k-softmmu, aarch64-softmmu, mips-softmmu, mipsel-softmmu, mips64-softmmu, mips64el-softmmu, sparc-softmmu,sparc64-softmmu,"

ERROR: Cannot use 'python', Python 2.4 or later is required.

   Note that Python 3 or later is not yet supported.

   Use --python=/path/to/python to specify a supported Python.

make: *** [qemu/config-host.h-timestamp] Error 1

error: [Errno 2] No such file or directory: 'libunicorn.so'


Cleaning up... Command /root/.virtualenvs/ctftools3/bin/python3 -c "import setuptools, tokenize;file='/root/.virtualenvs/ctftools3/build/unicorn/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-nut9ondu-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/.virtualenvs/ctftools3/include/site/python3.4 failed with error code 1 in /root/.virtualenvs/ctftools3/build/unicorn Storing debug log for failure in /root/.pip/pip.log TOOLS | pwndbg | INSTALL FAILED

Installing collected packages: unicorn Running setup.py install for unicorn Building C extensions cd qemu && \ ./configure --cc="cc" --extra-cflags="-DUNICORN_HAS_X86 -DUNICORN_HAS_ARM -DUNICORN_HAS_M68K -DUNICORN_HAS_ARM64 -DUNICORN_HAS_MIPS -DUNICORN_HAS_MIPSEL -DUNICORN_HAS_MIPS64 -DUNICORN_HAS_MIPS64EL -DUNICORN_HAS_SPARC -fPIC -fvisibility=hidden" --target-list="x86_64-softmmu, arm-softmmu, m68k-softmmu, aarch64-softmmu, mips-softmmu, mipsel-softmmu, mips64-softmmu, mips64el-softmmu, sparc-softmmu,sparc64-softmmu,"

ERROR: Cannot use 'python', Python 2.4 or later is required.
       Note that Python 3 or later is not yet supported.
       Use --python=/path/to/python to specify a supported Python.

make: *** [qemu/config-host.h-timestamp] Error 1
error: [Errno 2] No such file or directory: 'libunicorn.so'
Complete output from command /root/.virtualenvs/ctftools3/bin/python3 -c "import setuptools, tokenize;__file__='/root/.virtualenvs/ctftools3/build/unicorn/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-nut9ondu-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/.virtualenvs/ctftools3/include/site/python3.4:
running install

running build

Building C extensions

cd qemu && \

./configure --cc="cc" --extra-cflags="-DUNICORN_HAS_X86 -DUNICORN_HAS_ARM -DUNICORN_HAS_M68K -DUNICORN_HAS_ARM64 -DUNICORN_HAS_MIPS -DUNICORN_HAS_MIPSEL -DUNICORN_HAS_MIPS64 -DUNICORN_HAS_MIPS64EL -DUNICORN_HAS_SPARC -fPIC -fvisibility=hidden" --target-list="x86_64-softmmu, arm-softmmu, m68k-softmmu, aarch64-softmmu, mips-softmmu, mipsel-softmmu, mips64-softmmu, mips64el-softmmu, sparc-softmmu,sparc64-softmmu,"

ERROR: Cannot use 'python', Python 2.4 or later is required.

   Note that Python 3 or later is not yet supported.

   Use --python=/path/to/python to specify a supported Python.

make: *** [qemu/config-host.h-timestamp] Error 1

error: [Errno 2] No such file or directory: 'libunicorn.so'


Cleaning up... Command /root/.virtualenvs/ctftools3/bin/python3 -c "import setuptools, tokenize;file='/root/.virtualenvs/ctftools3/build/unicorn/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-nut9ondu-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/.virtualenvs/ctftools3/include/site/python3.4 failed with error code 1 in /root/.virtualenvs/ctftools3/build/unicorn Storing debug log for failure in /root/.pip/pip.log TOOLS | unicorn | INSTALL FAILED

Installing collected packages: unicorn Running setup.py install for unicorn Building C extensions cd qemu && \ ./configure --cc="cc" --extra-cflags="-DUNICORN_HAS_X86 -DUNICORN_HAS_ARM -DUNICORN_HAS_M68K -DUNICORN_HAS_ARM64 -DUNICORN_HAS_MIPS -DUNICORN_HAS_MIPSEL -DUNICORN_HAS_MIPS64 -DUNICORN_HAS_MIPS64EL -DUNICORN_HAS_SPARC -fPIC -fvisibility=hidden" --target-list="x86_64-softmmu, arm-softmmu, m68k-softmmu, aarch64-softmmu, mips-softmmu, mipsel-softmmu, mips64-softmmu, mips64el-softmmu, sparc-softmmu,sparc64-softmmu,"

ERROR: Cannot use 'python', Python 2.4 or later is required.
       Note that Python 3 or later is not yet supported.
       Use --python=/path/to/python to specify a supported Python.

make: *** [qemu/config-host.h-timestamp] Error 1
error: [Errno 2] No such file or directory: 'libunicorn.so'
Complete output from command /root/.virtualenvs/ctftools3/bin/python3 -c "import setuptools, tokenize;__file__='/root/.virtualenvs/ctftools3/build/unicorn/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-nut9ondu-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/.virtualenvs/ctftools3/include/site/python3.4:
running install

running build

Building C extensions

cd qemu && \

./configure --cc="cc" --extra-cflags="-DUNICORN_HAS_X86 -DUNICORN_HAS_ARM -DUNICORN_HAS_M68K -DUNICORN_HAS_ARM64 -DUNICORN_HAS_MIPS -DUNICORN_HAS_MIPSEL -DUNICORN_HAS_MIPS64 -DUNICORN_HAS_MIPS64EL -DUNICORN_HAS_SPARC -fPIC -fvisibility=hidden" --target-list="x86_64-softmmu, arm-softmmu, m68k-softmmu, aarch64-softmmu, mips-softmmu, mipsel-softmmu, mips64-softmmu, mips64el-softmmu, sparc-softmmu,sparc64-softmmu,"

ERROR: Cannot use 'python', Python 2.4 or later is required.

   Note that Python 3 or later is not yet supported.

   Use --python=/path/to/python to specify a supported Python.

make: *** [qemu/config-host.h-timestamp] Error 1

error: [Errno 2] No such file or directory: 'libunicorn.so'


Cleaning up... Command /root/.virtualenvs/ctftools3/bin/python3 -c "import setuptools, tokenize;file='/root/.virtualenvs/ctftools3/build/unicorn/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-nut9ondu-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/.virtualenvs/ctftools3/include/site/python3.4 failed with error code 1 in /root/.virtualenvs/ctftools3/build/unicorn Storing debug log for failure in /root/.pip/pip.log

root@anon-virtual-machine:~/ctf-tools/bin# uname Linux root@anon-virtual-machine:~/ctf-tools/bin# uname -r 4.4.0-72-generic

I'll be honest I'm not too sure what the problem is... guessing should be using python 2 instead of python 3?

raildex1 commented 7 years ago

Safe to close - unicorn fixed upstream - was a PATH issue.

pwndbg also installs fine on 14.04 (Trusty) when appdirs is installed.

raildex1 commented 7 years ago

lolnope.

What seems to be an issue is when unicorn is compiling qemu under Python3 with the pypi package - see #124