1

一开始我跑了这个:

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 中运行了这段代码,但遇到了同样的问题。

4

1 回答 1

0

看来您下载了错误的二进制文件(32 位、64 位)PyV8

FOR 32 bit 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 位架构,请使用以下步骤:

$ 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/
于 2016-07-15T13:29:49.197 回答