gpt4 book ai didi

编译 phantomjs 时 Xcode 设置不正确

转载 作者:行者123 更新时间:2023-12-01 13:33:56 24 4
gpt4 key购买 nike

我在编译 phantomjs 的 fork 时碰壁了, 关注 these instructions .我已经从 Appstore 安装了完整的 Xcode,并接受了许可协议(protocol)(例如 sudo xcodebuild -license ),这似乎是有关此错误的其他 SO 问题的问题。但是当我尝试编译时:

My-MBPX:phantomjs username$ python build.py
Password:
----------------------------------------
WARNING
----------------------------------------

Building PhantomJS from source takes a very long time, anywhere from 30 minutes
to several hours (depending on the machine configuration). It is recommended to
use the premade binary packages on supported operating systems.

For details, please go the the web site: http://phantomjs.org/download.html.

Do you want to continue (Y/n)? Y
Executing in /Users/username/Documents/github/phantomjs: git submodule init
Executing in /Users/username/Documents/github/phantomjs: git submodule update --init
configuring Qt Base, please wait...
Found OpenSSL installed via Brew
Executing in /Users/username/Documents/github/phantomjs/src/qt/qtbase: /Users/username/Documents/github/phantomjs/src/qt/qtbase/configure -static -opensource -confirm-license -prefix /Users/username/Documents/github/phantomjs/src/qt/qtbase -qt-zlib -qt-libpng -qt-libjpeg -qt-pcre -nomake examples -nomake tools -nomake tests -no-qml-debug -no-dbus -no-opengl -no-audio-backend -D QT_NO_GRAPHICSVIEW -D QT_NO_GRAPHICSEFFECT -D QT_NO_STYLESHEET -D QT_NO_STYLE_CDE -D QT_NO_STYLE_CLEANLOOKS -D QT_NO_STYLE_MOTIF -D QT_NO_STYLE_PLASTIQUE -D QT_NO_PRINTPREVIEWDIALOG -qpa phantom -openssl -openssl-linked -no-openvg -no-eglfs -no-egl -no-glib -no-gtkstyle -no-cups -no-sm -no-xinerama -no-xkb -no-xcb -no-kms -no-linuxfb -no-directfb -no-mtdev -no-libudev -no-evdev -no-pulseaudio -no-alsa -no-feature-PRINTPREVIEWWIDGET -no-pkg-config -no-c++11 -I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib -release

Xcode not set up properly. You may need to confirm the license
agreement by running /usr/bin/xcodebuild without arguments.

ERROR: Failed to build PhantomJS! Configuration of Qt Base failed.

使用 sudo 的结果相同.然后运行 ​​ /usr/bin/xcodebuild如建议返回:
xcodebuild: error: The directory /Users/username/Documents/github/phantomjs does not contain an Xcode project.

诚然,我确实必须在现有命令行工具版本之上升级 Xtools,并手动更改路径 ( sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer),但现在正确报告:
xcode-select -p
/Applications/Xcode.app/Contents/Developer

感激地收到任何建议。

最佳答案

This solution似乎奏效了:

cd /Applications/Xcode.app/Contents/Developer/usr/bin/
sudo ln -s xcodebuild xcrun

关于编译 phantomjs 时 Xcode 设置不正确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44584052/

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