第一次我跑了这个:
pip install -e git://github.com/brokenseal/PyV8-OS-X#egg=pyv8
此消息显示:
Obtaining pyv8 from git+git://github.com/brokenseal/PyV8-OS-X#egg=pyv8
Updating ./src/pyv8 clone
Running setup.py egg_info for package pyv8
Installing collected packages: pyv8
Running setup.py develop for pyv8
Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files
Creating /usr/local/lib/python2.7/dist-packages/PyV8.egg-link (link to .)
PyV8 0.8 is already the active version in easy-install.pth
Installed /root/src/pyv8
Successfully installed pyv8
Cleaning up...
我将此代码用于运行python-Wappalyzer:
from wappalyzer import Wappalyzer
错误是:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/wappalyzer/__init__.py", line 8, in <module>
from pyv8 import PyV8
File "/root/src/pyv8/pyv8/PyV8.py", line 17, in <module>
import _PyV8
ImportError: /root/src/pyv8/pyv8/_PyV8.so: invalid ELF header
我安装了lxml和Requests但没有修复。 我该如何解决这个问题。我在ubuntu 14.4和kali中运行了这个代码,但遇到了同样的问题。
答案 0 :(得分:0)
您似乎为PyV8
FOR 32位arch使用以下步骤:
$ wget -c "https://raw.githubusercontent.com/emmetio/pyv8-binaries/master/pyv8-linux32.zip"
$ unzip pyv8-linux32.zip
$ sudo cp *PyV8* /usr/lib/python2.7/dist-packages/
对于64位arch使用以下步骤:
$ wget -c "https://raw.githubusercontent.com/emmetio/pyv8-binaries/master/pyv8-linux64.zip"
$ unzip pyv8-linux64.zip
$ rm -rf /usr/lib/python2.7/dist-packages/*PyV8*
$ sudo cp *PyV8* /usr/lib/python2.7/dist-packages/