相关疑难解决方法(0)

macOS Mojave Update后,Git无法正常工作(xcrun:错误:无效的活动开发者路径(/ Library/Developer/CommandLineTools)

昨晚(2018年11月)我更新到macOS Mojave,

今天早上我在MacBook pro的Command line中导航到我的工作代码库,

在repo中键入"git status"并收到错误:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Run Code Online (Sandbox Code Playgroud)

git macos terminal xcode command-line

1190
推荐指数
27
解决办法
35万
查看次数

如何在packages.json中指定所需的Node.js版本?

我有一个Node.js项目需要Node 12或更高版本.有没有办法在packages.json文件中指定它,以便安装程序会自动检查并通知用户是否需要升级?

version package node.js npm

187
推荐指数
6
解决办法
9万
查看次数

无法在安装了命令行工具的Mavericks上使用xcodebuild

我已经安装了命令行工具:

$ xcode-select --print-path
/Library/Developer/CommandLineTools
Run Code Online (Sandbox Code Playgroud)

但是,当任何尝试使用时xcodebuild,我收到以下错误:

$ /usr/bin/xcodebuild
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
Run Code Online (Sandbox Code Playgroud)

在Mountain Lion上,可以在不安装整个Xcode的情况下使用它,而不仅仅是命令行工具.是否有可能在小牛队做到这一点?我怎样才能让它运转起来?

NB这是一个干净安装的小牛队.

更新:只是为了显示,我确实安装了命令行工具:

$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
Run Code Online (Sandbox Code Playgroud)

macos xcode operating-system osx-mavericks

93
推荐指数
5
解决办法
4万
查看次数

Xcode 6.1 - 如何卸载命令行工具?

我发布了安装Xcode命令行工具xcode-select --install; 现在我想卸载它(不卸载Xcode).

我试过了

sudo /Developer/Library/uninstall-devtools --mode=all
Run Code Online (Sandbox Code Playgroud)

但后来我得到了错误

sudo: /Developer/Library/uninstall-devtools: command not found
Run Code Online (Sandbox Code Playgroud)

xcode command-line-tool

51
推荐指数
3
解决办法
8万
查看次数

安装nokogiri时出错:无法构建gem原生扩展并且缺少libiconv(OSX)

我尝试克隆这个仓库并运行bundle install.捆绑过程失败并抛出此错误:

    ...
    Installing nokogiri 1.6.2.1 with native extensions
    Building nokogiri using packaged libraries.

    Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

        /Users/zulhilmizainudin/.rvm/rubies/ruby-2.2.0/bin/ruby -r ./siteconf20151130-43880-pntnc6.rb extconf.rb
    Building nokogiri using packaged libraries.
    -----
    libiconv is missing.  please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
    -----
    *** extconf.rb failed ***
    Could not create Makefile due to some reason, probably lack of necessary
    libraries and/or headers.  Check the mkmf.log file for more details.  You may
    need configuration options.

    Provided …
Run Code Online (Sandbox Code Playgroud)

ruby homebrew ruby-on-rails nokogiri osx-yosemite

48
推荐指数
7
解决办法
4万
查看次数

尝试在OS X上安装Qt给出'你需要安装Xcode 5.0.0',但是这个版本太旧了它不可用

我是Windows/Linux开发人员偶尔为OS X构建 - 特别是在Qt中.

我有一个简单的Qt项目,我一直在Windows上开发.我现在希望在OS X上构建它.

我正在运行优胜美地.我已安装Xcode 7并尝试安装Qt 5.5.

当我运行Qt安装程序时,在提示登录Qt后立即(成功),我收到以下错误:

您需要安装Xcode版本5.0.0.

Qt安装失败

我试图在Apple Developer网站上找到Xcode 5.0.0,但这是最新版本背后的两个主要版本,我甚至找不到它的安装程序.

更重要的是,我确实想知道为什么最新版本的Qt需要一个被Apple认为太旧的Xcode版本,甚至不可用.

如何克服这个问题,以便我可以在OS X上安装Qt?

macos xcode qt osx-yosemite

38
推荐指数
3
解决办法
2万
查看次数

错误:无法解析'macosx10.8'的SDK路径

所以我刚刚在5分钟前安装了qt,当我想在Push Button中编写一行简单的文本并尝试运行它时,我收到了这个错误:

:-1:错误:无法解析'macosx10.8'的SDK路径

有人可以帮忙吗?另外,如果你需要我做点什么,你能不能解释我好五个.(实际上并不像我五岁,但我希望你知道我的意思)

c++ qt

37
推荐指数
2
解决办法
2万
查看次数

无法运行Swift Package Manager(macOS 10.14.4)

当我在终端窗口中尝试“ swift软件包”时,显示以下内容:

dyld: Library not loaded: @rpath/llbuild.framework/Versions/A/llbuild
Referenced from: /Library/Developer/CommandLineTools/usr/bin/swift-package 
    Reason: image not found
    Abort trap: 6
Run Code Online (Sandbox Code Playgroud)

我认为可能与更新到Xcode 10.2和Swift 5有关吗?在更新之前,我从未与包管理器打过交道。而且我也不是贝壳专家。

无论如何,这是相关的“ swift版本”输出:

Apple Swift version 5.0 (swiftlang-1001.0.69.5 clang-1001.0.46.3)
Target: x86_64-apple-darwin18.5.0
Run Code Online (Sandbox Code Playgroud)

xcode dyld swift swift-package-manager xcode10.2

24
推荐指数
2
解决办法
3536
查看次数

“ npx cap add ios”失败,并显示错误“使用 pod install 更新 iOS 本机依赖项 - 失败!”

我刚刚创建了一个全新的 Ionic 应用程序,使用命令“ionic start myApp Blank”

\n

我添加了必要的角度依赖性以使“离子服务”正常工作。

\n

我已经使用以下命令安装了电容器

\n
npm install @capacitor/cli @capacitor/core\nnpx cap init\n\nnpm install @capacitor/ios @capacitor/android\n
Run Code Online (Sandbox Code Playgroud)\n

我的 Package.json 如下所示,

\n
{\n  "name": "myApp",\n  "version": "0.0.1",\n  "author": "Ionic Framework",\n  "homepage": "https://ionicframework.com/",\n  "scripts": {\n    "ng": "ng",\n    "start": "ng serve",\n    "build": "ng build",\n    "test": "ng test",\n    "lint": "ng lint",\n    "e2e": "ng e2e"\n  },\n  "private": true,\n  "dependencies": {\n    "@angular/common": "~12.1.1",\n    "@angular/core": "~12.1.1",\n    "@angular/forms": "~12.1.1",\n    "@angular/platform-browser": "~12.1.1",\n    "@angular/platform-browser-dynamic": "~12.1.1",\n    "@angular/router": "~12.1.1",\n    "@capacitor/android": "^3.2.4",\n    "@capacitor/app": "1.0.3",\n    "@capacitor/core": "^3.2.4",\n    "@capacitor/haptics": "1.1.0",\n    "@capacitor/ios": …
Run Code Online (Sandbox Code Playgroud)

xcode ios ionic-framework angular capacitor

20
推荐指数
3
解决办法
3万
查看次数

Visual Studio 2019 在更新“No SDK found at specified location”后无法连接到 Mac 安装的 Visual Studio for Mac

在更新我的 PC 的 Visual Studio 2019 (v16.8) 之前,我能够构建 Xamarin 应用程序并毫无问题地连接到我的 Mac。更新到 Visual Studio 2019 (v16.9) 后,VS 经历了想要更新远程 Visual Studio for Mac 的正常过程,一切似乎都没有问题更新,但是在远程更新后尝试连接时出现错误

“无法验证 Xcode 许可证状态,因为在连接的 Mac 的默认位置找不到 Xcode。安装 Xcode 并使其正常运行是构建和运行 iOS 应用程序所必需的,因此请检查 Xcode 是否已正确安装并在 iOS 设置下指定的路径是正确的。”

在 Mac 上,我确保 Xcode 和 VS for 是最新的。(VS 有我所做的更新),我仍然遇到了同样的问题(在 Windows 上)。

检查 VS for Mac 的 Preferences Projects->SDK Locations->Apple 它表明它找不到 Xcode(它正在使用 /Library/Developer/CommandlineTools/SDKs 中的一个位置)。

“在指定位置找不到 SDK”

我将其更改为 /Application/Xcode.app ,然后显示它现在可以找到它,但需要重新启动 VS for Mac。这样做之后,并重新检查新设置的值,我发现它已恢复到错误的位置!无论我尝试什么,每次我回去查看设置时,它总是会恢复。

我想我需要改变偏好,但我似乎无法获得留下的价值

xcode visual-studio xamarin visual-studio-mac visual-studio-2019

8
推荐指数
3
解决办法
1527
查看次数