question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

install angr failed (macOS Mojave)

See original GitHub issue

I’m trying install angr following Install Instructions

First I install python3.7 using brew install python3. I installed unicorn with python2. Then installed angr using pip3 install angr

bash-3.2$ pip3 install angr
Requirement already satisfied: angr in /usr/local/lib/python3.7/site-packages (8.19.4.5)
Requirement already satisfied: psutil in /usr/local/lib/python3.7/site-packages/psutil-5.6.3-py3.7-macosx-10.14-x86_64.egg (from angr) (5.6.3)
Requirement already satisfied: networkx>=2.0 in /usr/local/lib/python3.7/site-packages/networkx-2.3-py3.7.egg (from angr) (2.3)
Requirement already satisfied: unicorn in /usr/local/lib/python3.7/site-packages/unicorn-1.0.2-py3.7.egg (from angr) (1.0.2)
Requirement already satisfied: ailment==8.19.4.5 in /usr/local/lib/python3.7/site-packages/ailment-8.19.4.5-py3.7.egg (from angr) (8.19.4.5)
Requirement already satisfied: itanium-demangler in /usr/local/lib/python3.7/site-packages/itanium_demangler-1.0-py3.7.egg (from angr) (1.0)
Requirement already satisfied: cachetools in /usr/local/lib/python3.7/site-packages/cachetools-3.1.1-py3.7.egg (from angr) (3.1.1)
Requirement already satisfied: mulpyplexer in /usr/local/lib/python3.7/site-packages/mulpyplexer-0.8-py3.7.egg (from angr) (0.8)
Requirement already satisfied: archinfo==8.19.4.5 in /Users/gang/Code/angr/.eggs/archinfo-8.19.4.5-py3.7.egg (from angr) (8.19.4.5)
Requirement already satisfied: rpyc in /usr/local/lib/python3.7/site-packages/rpyc-4.1.0-py3.7.egg (from angr) (4.1.0)
Requirement already satisfied: sortedcontainers in /usr/local/lib/python3.7/site-packages/sortedcontainers-2.1.0-py3.7.egg (from angr) (2.1.0)
Requirement already satisfied: cffi>=1.7.0 in /Users/gang/Code/angr/.eggs/cffi-1.12.3-py3.7-macosx-10.14-x86_64.egg (from angr) (1.12.3)
Requirement already satisfied: pycparser>=2.18 in /Users/gang/Code/angr/.eggs/pycparser-2.19-py3.7.egg (from angr) (2.19)
Requirement already satisfied: capstone>=3.0.5rc2 in /usr/local/lib/python3.7/site-packages/capstone-4.0.1-py3.7.egg (from angr) (4.0.1)
Requirement already satisfied: cooldict in /usr/local/lib/python3.7/site-packages/cooldict-1.4-py3.7.egg (from angr) (1.4)
Requirement already satisfied: progressbar in /usr/local/lib/python3.7/site-packages/progressbar-2.5-py3.7.egg (from angr) (2.5)
Requirement already satisfied: dpkt in /usr/local/lib/python3.7/site-packages/dpkt-1.9.2-py3.7.egg (from angr) (1.9.2)
Requirement already satisfied: pyvex==8.19.4.5 in /Users/gang/Code/angr/.eggs/pyvex-8.19.4.5-py3.7.egg (from angr) (8.19.4.5)
Requirement already satisfied: claripy==8.19.4.5 in /usr/local/lib/python3.7/site-packages/claripy-8.19.4.5-py3.7.egg (from angr) (8.19.4.5)
Requirement already satisfied: cle==8.19.4.5 in /usr/local/lib/python3.7/site-packages/cle-8.19.4.5-py3.7.egg (from angr) (8.19.4.5)
Requirement already satisfied: GitPython in /usr/local/lib/python3.7/site-packages/GitPython-2.1.12-py3.7.egg (from angr) (2.1.12)
Requirement already satisfied: decorator>=4.3.0 in /usr/local/lib/python3.7/site-packages/decorator-4.4.0-py3.7.egg (from networkx>=2.0->angr) (4.4.0)
Requirement already satisfied: plumbum in /usr/local/lib/python3.7/site-packages/plumbum-1.6.7-py3.7.egg (from rpyc->angr) (1.6.7)
Requirement already satisfied: ana>=0.1 in /usr/local/lib/python3.7/site-packages/ana-0.6-py3.7.egg (from cooldict->angr) (0.6)
Requirement already satisfied: bitstring in /Users/gang/Code/angr/.eggs/bitstring-3.1.6-py3.7.egg (from pyvex==8.19.4.5->angr) (3.1.6)
Requirement already satisfied: future in /Users/gang/Code/angr/.eggs/future-0.17.1-py3.7.egg (from pyvex==8.19.4.5->angr) (0.17.1)
Requirement already satisfied: z3-solver==4.5.1.0.post2 in /usr/local/lib/python3.7/site-packages/z3_solver-4.5.1.0.post2-py3.7.egg (from claripy==8.19.4.5->angr) (4.5.1.0.post2)
Requirement already satisfied: pysmt in /usr/local/lib/python3.7/site-packages/PySMT-0.8.1.dev79-py3.7.egg (from claripy==8.19.4.5->angr) (0.8.1.dev79)
Requirement already satisfied: pyelftools>=0.25 in /usr/local/lib/python3.7/site-packages/pyelftools-0.25-py3.7.egg (from cle==8.19.4.5->angr) (0.25)
Requirement already satisfied: idalink in /usr/local/lib/python3.7/site-packages/idalink-0.12-py3.7.egg (from cle==8.19.4.5->angr) (0.12)
Requirement already satisfied: pefile in /usr/local/lib/python3.7/site-packages/pefile-2019.4.18-py3.7.egg (from cle==8.19.4.5->angr) (2019.4.18)
Requirement already satisfied: ddt>=1.1.1 in /usr/local/lib/python3.7/site-packages/ddt-1.2.1-py3.7.egg (from GitPython->angr) (1.2.1)
Requirement already satisfied: gitdb2>=2.0.0 in /usr/local/lib/python3.7/site-packages/gitdb2-2.0.5-py3.7.egg (from GitPython->angr) (2.0.5)
Requirement already satisfied: gitdb>=0.6.4 in /usr/local/lib/python3.7/site-packages/gitdb-0.6.4-py3.7-macosx-10.14-x86_64.egg (from GitPython->angr) (0.6.4)
Requirement already satisfied: six in /usr/local/Cellar/protobuf/3.7.1/libexec/lib/python3.7/site-packages (from pysmt->claripy==8.19.4.5->angr) (1.12.0)
Requirement already satisfied: smmap2>=2.0.0 in /usr/local/lib/python3.7/site-packages/smmap2-2.0.5-py3.7.egg (from gitdb2>=2.0.0->GitPython->angr) (2.0.5)
Requirement already satisfied: smmap>=0.8.5 in /usr/local/lib/python3.7/site-packages/smmap-0.9.0-py3.7.egg (from gitdb>=0.6.4->GitPython->angr) (0.9.0)

I failed in the final step.

bash-3.2$ source venv/bin/activate
(venv) bash-3.2$ PYVEX=`python3 -c 'import pyvex; print(pyvex.__path__[0])'`
(venv) bash-3.2$ UNICORN=`python3 -c 'import unicorn; print(unicorn.__path__[0])'`
(venv) bash-3.2$ ANGR=`python3 -c 'import angr; print(angr.__path__[0])'`
WARNING | 2019-07-26 17:18:04,113 | angr.state_plugins.unicorn_engine | failed loading "angr_native.dylib", unicorn support disabled (dlopen(/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/angr/lib/angr_native.dylib, 6): Library not limport pyvex
oaded: /Users/gang/Code/angr/.eggs/pyvex-8.19.4.5-py3.7.egg/pyvex/lib/libpyvex.dylib
import pyvex
  Referenced from: /usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/angr/lib/angr_native.dylib
  Reason: no suitable image found.  Did find:
	/Users/gang/Code/angr/.eggs/pyvex-8.19.4.5-py3.7.egg/pyvex/lib/libpyvex.dylib: stat() failed with errno=20)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
twizmwazincommented, Jul 29, 2019

I’ve done a little bit of debugging and have a workaround that should result in a mostly-functioning angr environment. Checkout unicorn from git, and follow their *nix build instructions, outside of a virtualenv, with python2 as python. Then, after that build is complete, activate your python3 virtualenv, and cd into the bindings/python directory. Then run python setup.py install. Now unicorn is installed, run pip install angr. It’ll take a while because it has to build everything, but it should succeed and you should be able to use angr.

3reactions
twizmwazincommented, Jul 30, 2019

A decent fix should be underway, a PR has been submitted to unicorn: https://github.com/unicorn-engine/unicorn/pull/1107

Once that is merged I believe the intent is to make at least a pip release which should make more people’s lives easier.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installing - angr Documentation
Failing that, you can install angr by installing the following repositories, in order, from https://github.com/angr:.
Read more >
macOS Mojave install error - Apple Community
I am trying to upgrade my 2018 MacBook Pro 13" from High Sierra to Mojave, but it says "An error occurred installing macOS"...
Read more >
Error when I'm trying to install angr on OS X - Stack Overflow
1 Answer 1 ... You appear to be using Python 3. angr depends upon the package dpkt-fix , which tries to import itself...
Read more >
macOS 安装angr_桃子小迷妹的博客
安装命令pip install angr但是在运行后,出现了错误WARNING | 2021-07-01 10:48:42162 | angr.state_plugins.unicorn_engine | Unicorn is not ...
Read more >
Angr-7.8.9.26 Depends On capstone==3.0.5 And Setup Error
On MacOSX 10.14 Mojave. Use command "pip2 install angr" to install angr model for python2.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found