2

当我在 ubuntu 中构建 pyv8 时出现此错误,下载了所有依赖项,它似乎仍然遗漏了什么?

cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    c++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/src/Utils.o build/temp.linux-x86_64-2.7/src/Exception.o build/temp.linux-x86_64-2.7/src/Context.o build/temp.linux-x86_64-2.7/src/Engine.o build/temp.linux-x86_64-2.7/src/Wrapper.o build/temp.linux-x86_64-2.7/src/Debug.o build/temp.linux-x86_64-2.7/src/Locker.o build/temp.linux-x86_64-2.7/src/AST.o build/temp.linux-x86_64-2.7/src/PrettyPrinter.o build/temp.linux-x86_64-2.7/src/PyV8.o -L/usr/local/lib -L/opt/pyv8me/build/v8_r19632//out/x64.release/obj.target/tools/gyp/ -lboost_python -lboost_thread -lboost_system -lrt -lv8_base.x64 -lv8_snapshot -o build/lib.linux-x86_64-2.7/_PyV8.so -fPIC -lrt
      /usr/bin/ld: cannot find -lv8_base.x64
      /usr/bin/ld: cannot find -lv8_snapshot
      collect2: error: ld returned 1 exit status
      error: command 'c++' failed with exit status 1
4

1 回答 1

1

在命令上遇到了同样的问题,python setup.py build但我能够通过运行以下命令在全新安装的 Ubuntu 16 上安装 pyv8:

#Utilities
sudo apt-get install git
sudo apt-get install python-setuptools

#Boost
sudo apt-get install libboost-all-dev

#Pyv8
git clone https://github.com/buffer/pyv8.git
cd pyv8
sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 python-dev
sudo easy_install greenlet
sudo easy_install gevent
python setup.py build
sudo python setup.py install
于 2016-06-14T02:30:02.987 回答