【问题标题】:npm install odbc fails on macOS Sierra(Version 10.12.6)npm install odbc 在 macOS Sierra(版本 10.12.6)上失败
【发布时间】:2018-06-03 02:34:20
【问题描述】:

我在 macOS Sierra(版本 10.12.6)上安装 odbc 包时遇到问题

我在 macOS Sierra(版本 10.12.6)上安装了 unixODBC

这是发出“npm install odbc”的输出

odbc@1.3.0 安装 /Users/cspc106/Documents/app/node_modules/odbc node-gyp 配置构建

2017-12-20 19:11:51.288 xcodebuild[3376:23375] [MT] DVTSDK:警告:路径“”的 SDK 路径冲突:名为“watchos4.0”的 SDK 已被具有“watchos4. 0'。 2017-12-20 19:11:51.289 xcodebuild[3376:23375] [MT] DVTSDK:警告:路径''的 SDK 路径冲突:名为 'iphonesimulator11.0' 的 SDK 被具有 'iphonesimulator11.0' 的 SDK 取代。 2017-12-20 19:11:51.290 xcodebuild[3376:23375] [MT] DVTSDK:警告:路径“”的 SDK 路径冲突:名为“macosx10.13”的 SDK 被具有“macosx10.13”的 SDK 取代。 2017-12-20 19:11:51.291 xcodebuild[3376:23375] [MT] DVTSDK:警告:路径“”的 SDK 路径冲突:名为“appletvsimulator11.0”的 SDK 被具有“appletvsimulator11.0”的 SDK 取代。 2017-12-20 19:11:51.292 xcodebuild[3376:23375] [MT] DVTSDK:警告:路径“”的 SDK 路径冲突:名为“watchsimulator4.0”的 SDK 被具有“watchsimulator4.0”的 SDK 取代。 2017-12-20 19:11:51.293 xcodebuild[3376:23375] [MT] DVTSDK:警告:路径“”的 SDK 路径冲突:名为“appletvos11.0”的 SDK 被具有“appletvos11.0”的 SDK 取代。 2017-12-20 19:11:51.293 xcodebuild[3376:23375] [MT] DVTSDK:警告:路径“”的 SDK 路径冲突:名为“iphoneos11.0”的 SDK 被“iphoneos11.0”的 SDK 取代。 2017-12-20 19:11:51.466 xcodebuild[3376:23375] [MT] DVTPlugInManager:IDEDevkitRefactoring.ideplugin (com.apple.dt.IDE.IDEDevkitRefactoring) 所需的插件兼容性 UUID DF11C142-1584-4A99-87AC-1925D5F5652A ) 不存在 2017-12-20 19:11:51.540 xcodebuild[3376:23375] [MT] DVTPlugInLoading:无法加载插件 com.apple.dt.IDE.IDEiOSSupportCore 的代码(/Applications/Xcode.app/Contents/PlugIns/ IDEiOSSupportCore.ideplugin),错误=错误域=NSCocoaErrorDomain 代码=3588“dlopen(/Applications/Xcode.app/Contents/PlugIns/IDEiOSSupportCore.ideplugin/Contents/MacOS/IDEiOSSupportCore,265):找不到符号:_OBJC_CLASS_$_FXPCSessionManager 引用自:/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator(专为 Mac OS X 10.12 构建) 预期在:/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/Frameworks/FoundationXPC.framework/Versions/A/FoundationXPC 在 /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator" UserInfo={NSLocalizedFailureReason=无法加载包。, NSLocalizedRecoverySuggestion=尝试重新安装包。, NSFilePath=/Applications/Xcode.app/Contents /PlugIns/IDEiOSSupportCore.ideplugin/Contents/MacOS/IDEiOSSupportCore,NSDebugDescription=dlopen(/Applications/Xcode.app/Contents/PlugIns/IDEiOSSupportCore.ideplugin/Contents/MacOS/IDEiOSSupportCore,265):找不到符号:_OBJC_CLASS_$_FXPCSessionManager 引用自:/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator(专为 Mac OS X 10.12 构建) 预期在:/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/Frameworks/FoundationXPC.framework/Versions/A/FoundationXPC 在 /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator, NSBundlePath=/Applications/Xcode.app/Contents/PlugIns/IDEiOSSupportCore.ideplugin, NSLocalizedDescription=无法加载“IDEiOSSupportCore”包。}, dyldError = dlopen(/Applications/Xcode.app/Contents/PlugIns/IDEiOSSupportCore.ideplugin/Contents/MacOS/IDEiOSSupportCore,0):找不到符号:_OBJC_CLASS_$_FXPCSessionManager 引用自:/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator(专为 Mac OS X 10.12 构建) 预期在:/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/Frameworks/FoundationXPC.framework/Versions/A/FoundationXPC 在 /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator 2017-12-20 19:11:51.541 xcodebuild[3376:23375] [MT] DVTAssertions:/Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-13247/IDEFoundation/Initialization/IDEInitialization.m 中的警告: 264 详细信息:Xcode 初始插件扫描失败,error = Error Domain=DVTPlugInErrorDomain Code=2 "Loading a plug-in failed." UserInfo={DVTPlugInIdentifierErrorKey=com.apple.dt.IDE.IDEiOSSupportCore, DVTPlugInExecutablePathErrorKey=/Applications/Xcode.app/Contents/PlugIns/IDEiOSSupportCore.ideplugin/Contents/MacOS/IDEiOSSupportCore, NSLocalizedRecoverySuggestion=插件或其必备插件之一-ins 可能丢失或损坏,可能需要重新安装。, DVTPlugInDYLDErrorMessageErrorKey=dlopen(/Applications/Xcode.app/Contents/PlugIns/IDEiOSSupportCore.ideplugin/Contents/MacOS/IDEiOSSupportCore, 0): Symbol not found: _OBJC_CLASS_$_FXPCSessionManager 引用自:/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator(专为 Mac OS X 10.12 构建) 预期在:/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/Frameworks/FoundationXPC.framework/Versions/A/FoundationXPC 在/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator, NSLocalizedDescription=加载插件失败。, NSFilePath=/Applications/Xcode.app/Contents/PlugIns/IDEiOSSupportCore.ideplugin, NSLocalizedFailureReason=插件在路径“/Applications/Xcode.app/Contents/PlugIns/IDEiOSSupportCore.ideplugin”的“com.apple.dt.IDE.IDEiOSSupportCore”中无法加载。插件或其必备插件之一可能丢失或损坏。,NSUnderlyingError=0x7ff0ce6900b0 {Error Domain=NSCocoaErrorDomain Code=3588 "dlopen(/Applications/Xcode.app/Contents/PlugIns/IDEiOSSupportCore.ideplugin/Contents/ MacOS/IDEiOSSupportCore,265):找不到符号:_OBJC_CLASS_$_FXPCSessionManager 引用自:/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator(专为 Mac OS X 10.12 构建) 预期在:/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/Frameworks/FoundationXPC.framework/Versions/A/FoundationXPC 在 /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator" UserInfo={NSLocalizedFailureReason=无法加载包。, NSLocalizedRecoverySuggestion=尝试重新安装包。, NSFilePath=/Applications/Xcode.app/Contents /PlugIns/IDEiOSSupportCore.ideplugin/Contents/MacOS/IDEiOSSupportCore,NSDebugDescription=dlopen(/Applications/Xcode.app/Contents/PlugIns/IDEiOSSupportCore.ideplugin/Contents/MacOS/IDEiOSSupportCore,265):找不到符号:_OBJC_CLASS_$_FXPCSessionManager 引用自:/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator(专为 Mac OS X 10.12 构建) 预期在:/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/Frameworks/FoundationXPC.framework/Versions/A/FoundationXPC 在 /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator, NSBundlePath=/Applications/Xcode.app/Contents/PlugIns/IDEiOSSupportCore.ideplugin, NSLocalizedDescription=无法加载包“IDEiOSSupportCore”。}} } 函数:BOOL _IDEInitializePlugInManager(IDEInitializationOptions, NSError *__autoreleasing *) 线程:{number = 1,name = main} 请在http://bugreport.apple.com 提交错误,并附上此警告消息以及您可以提供的任何有用信息。 xcodebuild:错误:初始化失败。 原因:加载插件失败。

make:错误:无法找到实用程序“make”,不是开发人员工具或 PATH 吉普错误!构建错误 吉普错误!堆栈错误:make 失败,退出代码:72 吉普错误! ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23) 的堆栈 吉普错误!堆栈在 emitTwo (events.js:126:13) 吉普错误! ChildProcess.emit (events.js:214:7) 的堆栈 吉普错误!堆栈在 Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) 吉普错误!系统达尔文 16.7.0 吉普错误!命令“/usr/local/bin/node”“/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js”“配置”“构建” 吉普错误! cwd /Users/cspc106/Documents/app/node_modules/odbc 吉普错误!节点-v v8.9.3 吉普错误!节点gyp -v v3.6.2 吉普错误!不好 npm WARN 可选跳过可选依赖:bufferutil@1.2.1 (node_modules/bufferutil): npm WARN 可选跳过可选依赖:bufferutil@1.2.1 安装:node-gyp rebuild npm WARN 可选跳过可选依赖:退出状态 1 npm WARN 可选跳过可选依赖:utf-8-validate@1.2.2 (node_modules/utf-8-validate): npm WARN 可选跳过可选依赖:utf-8-validate@1.2.2 安装:node-gyp rebuild npm WARN 可选跳过可选依赖:退出状态 1

npm 错误!代码生命周期 npm 错误!错误号 1 npm 错误! odbc@1.3.0 安装:node-gyp configure build npm 错误!退出状态 1 npm 错误! npm 错误! odbc@1.3.0 安装脚本失败。 npm 错误!这可能不是 npm 的问题。上面可能还有额外的日志输出。

npm 错误!可以在以下位置找到此运行的完整日志: npm 错误! /Users/cspc106/.npm/_logs/2017-12-20T13_41_52_231Z-debug.log

【问题讨论】:

    标签: node.js macos npm electron macos-sierra


    【解决方案1】:

    问题是由于您的系统中缺少 make 实用程序,您可以在此处看到:

    make:错误:无法找到实用程序“make”,不是开发工具或 PATH gyp ERR!构建错误 gyp ERR!堆栈错误:make 失败,退出代码:72 gyp ERR!

    要在 Mac 上使用该实用程序,您需要先安装 XCode。那么您应该能够毫无问题地进行该安装。

    作为旁注;任何使用本机模块的 NPM 包都需要命令行工具(用 C / C++ 编写,需要在安装的基础上构建)。

    【讨论】:

    • XCode 安装在我的 Mac 上。
    • @VimalSharma 如果您已经安装了 XCode,则需要确保您还安装了命令行开发人员工具。尝试在命令行中运行此命令:xcode-select --install
    猜你喜欢
    • 1970-01-01
    • 2017-01-14
    • 2022-08-11
    • 1970-01-01
    • 2019-04-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-04-11
    相关资源
    最近更新 更多