brew 升级软件时总是出错,试了很多方法,前些天全新安装了 macOS15.1.1,还是没有解决,麻烦大家看看:
==> Upgrading calibre ==> Downloading https://download.calibre-ebook.com/7.22.0/calibre-7.22.0.dmg ###################################################################################################### 100.0% ==> Backing App 'calibre.app' up to '/usr/local/Caskroom/calibre/7.21.0/calibre.app' ==> Removing App '/Applications/calibre.app' ==> Unlinking Binary '/usr/local/bin/calibre' ==> Unlinking Binary '/usr/local/bin/calibre-complete' ==> Unlinking Binary '/usr/local/bin/calibre-customize' ==> Unlinking Binary '/usr/local/bin/calibre-debug' ==> Unlinking Binary '/usr/local/bin/calibre-parallel' ==> Unlinking Binary '/usr/local/bin/calibre-server' ==> Unlinking Binary '/usr/local/bin/calibre-smtp' ==> Unlinking Binary '/usr/local/bin/calibredb' ==> Unlinking Binary '/usr/local/bin/ebook-convert' ==> Unlinking Binary '/usr/local/bin/ebook-device' ==> Unlinking Binary '/usr/local/bin/ebook-polish' ==> Unlinking Binary '/usr/local/bin/ebook-viewer' ==> Unlinking Binary '/usr/local/bin/fetch-ebook-metadata' ==> Unlinking Binary '/usr/local/bin/lrf2lrs' ==> Unlinking Binary '/usr/local/bin/lrfviewer' ==> Unlinking Binary '/usr/local/bin/lrs2lrf' ==> Unlinking Binary '/usr/local/bin/markdown-calibre' ==> Unlinking Binary '/usr/local/bin/web2disk' ==> Unlinking Binary '/usr/local/bin/ebook-edit' ==> Unlinking Binary '/usr/local/bin/ebook-meta' ==> Moving App 'calibre.app' to '/Applications/calibre.app'
/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging' 11 | //===----------------------------------------------------------------------===// 12 | 13 | module SwiftBridging { | `- error: redefinition of module 'SwiftBridging' 14 | header "bridging" 15 |
/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here 11 | //===----------------------------------------------------------------------===// 12 | 13 | module SwiftBridging { | `- note: previously defined here 14 | header "bridging" 15 |
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Modules/Foundation.swiftmodule/x86_64-apple-macos.swiftinterface:5:8: error: failed to build module 'CoreFoundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.43 clang-1600.0.25.3)', while this compiler is 'Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)'). Please select a toolchain which matches the SDK. 3 | // swift-module-flags: -target x86_64-apple-macos15.1 -target-variant x86_64-apple-ios18.1-macabi -enable-objc-interop -autolink-force-load -enable-library-evolution -module-link-name swiftFoundation -swift-version 5 -enforce-exclusivity=unchecked -O -library-level api -enable-upcoming-feature InferSendableFromCaptures -enable-bare-slash-regex -user-module-version 3107 -module-name Foundation -package-name ""FoundationPreview"" 4 | import Combine 5 | import CoreFoundation | `- error: failed to build module 'CoreFoundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.43 clang-1600.0.25.3)', while this compiler is 'Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)'). Please select a toolchain which matches the SDK. 6 | import Darwin 7 | import Dispatch
/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap: 0: /Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap: 0: /usr/local/Homebrew/Library/Homebrew/cask/utils/copy-xattrs.swift:3:8: error: failed to build module 'Foundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.43 clang-1600.0.25.3)', while this compiler is 'Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)'). Please select a toolchain which matches the SDK. 1 | #!/usr/bin/swift 2 | 3 | import Foundation | `- error: failed to build module 'Foundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.43 clang-1600.0.25.3)', while this compiler is 'Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)'). Please select a toolchain which matches the SDK. 4 | 5 | struct SwiftErr: TextOutputStream { ==> Purging files for version 7.22.0 of Cask calibre ==> Purging files for version 7.22.0 of Cask calibre Warning: Reverting upgrade for Cask calibre ==> Purging files for version 7.21.0 of Cask calibre
Error: Problems with multiple casks: calibre: It seems there is already an App at '/Applications/calibre.app'.
现在用 brew install xxxx --adopt 方法代替升级
重装 brew ,重装 CommandLineTools, 最后全新安装了系统,没用时间机器恢复数据,还是没有解决
安装 brew 是用国内的:/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.