gpt4 book ai didi

ubuntu - 构建 pyv8 得到/usr/bin/ld : cannot find -lv8_base. x64 错误

转载 作者:行者123 更新时间:2023-12-04 18:32:12 25 4
gpt4 key购买 nike

当我在 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

最佳答案

在命令 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

关于ubuntu - 构建 pyv8 得到/usr/bin/ld : cannot find -lv8_base. x64 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33796446/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com