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)"
Error: Failure while executing; /usr/bin/env /Library/Developer/CommandLineTools/usr/bin/swift -target x86_64-apple-macosx15 /usr/local/Homebrew/Library/Homebrew/cask/utils/copy-xattrs.swift /usr/local/Caskroom/double-commander/1.1.21/Double\ Commander.app /Applications/Double\ Commander.app
exited with 1. Here's the output:
listxattr for destination failed: 2
Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue. If everything you use Homebrew for is working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: Some installed casks are deprecated or disabled. You should find replacements for the following casks: cakebrew
Warning: No Cask quarantine support available: unknown reason.
HOMEBREW_VERSION: 4.4.8 ORIGIN: https://github.com/Homebrew/brew HEAD: e78a0adb4f260913fffdc956cc8c20fb54109feb Last commit: 5 days ago Branch: stable Core tap JSON: 01 Dec 02:08 UTC Core cask tap JSON: 01 Dec 02:08 UTC HOMEBREW_PREFIX: /usr/local HOMEBREW_API_DOMAIN: https://mirrors.aliyun.com/homebrew/homebrew-bottles/api HOMEBREW_BOTTLE_DOMAIN: https://mirrors.aliyun.com/homebrew/homebrew-bottles HOMEBREW_CASK_OPTS: [] HOMEBREW_MAKE_JOBS: 8 HOMEBREW_PIP_INDEX_URL: http://mirrors.aliyun.com/pypi/simple Homebrew Ruby: 3.3.6 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/bin/ruby CPU: octa-core 64-bit cometlake Clang: 16.0.0 build 1600 Git: 2.39.5 => /Library/Developer/CommandLineTools/usr/bin/git Curl: 8.7.1 => /usr/bin/curl macOS: 15.1.1-x86_64 CLT: 16.1.0.0.1.1729049160 Xcode: N/A
1
Ipsum 28 天前
先把这个软件删了呢?
|
4
donaldturinglee 28 天前 via Android
很可能是 brew 出的问题,不过 Mac 我一般都是手动安装或者安装包安装的
|
5
Dislocator 28 天前
挂梯子,用国外的 brew
|
6
hefish 28 天前
挂梯子,用国外的 brew +1
|
7
sitdownkevin 28 天前
|
8
sylarc OP @sitdownkevin 感谢,貌似对症,我试一下
|
9
sylarc OP @donaldturinglee 更新强迫症,又想偷懒,brew 可以快速升级不费力
|
10
sylarc OP @Dislocator @hefish 换源试过,无效
|
11
sylarc OP 按 @sitdownkevin 指引,错误缩小了,还是 clt 有问题
Error: Failure while executing; `/usr/bin/env /Library/Developer/CommandLineTools/usr/bin/swift -target x86_64-apple-macosx15 /usr/local/Homebrew/Library/Homebrew/cask/utils/copy-xattrs.swift /usr/local/Caskroom/opera/115.0.5322.68/Opera.app /Applications/Opera.app` exited with 1. Here's the output: listxattr for destination failed: 2 |
12
donaldturinglee 28 天前 via Android
手动降依赖不是很安全的,你到时候能正常用了,但是有些软件又开不了了,属于拆了东墙补西墙
|
13
dilidilid 27 天前
装不上就不用 brew 装呗,这玩意儿也是人维护的,没道理完全不出错
|
14
Nosub 27 天前 via iPhone
|
15
nieyujiang 27 天前
执行一下 file /usr/bin/xattr 这个命令,看下返回是不是下面这个输出.
/usr/bin/xattr: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e] /usr/bin/xattr (for architecture x86_64): Mach-O 64-bit executable x86_64 /usr/bin/xattr (for architecture arm64e): Mach-O 64-bit executable arm64e |
16
sylarc OP @nieyujiang 是的,一模一样,求批明方向
|
18
PhDLuffy 27 天前
路由挂梯子,mac 用全局模式或增强模式,从来没出过错。
|
19
nieyujiang 27 天前 via iPhone
@sylarc 一样就不清楚了,之前有遇到过 xattr 命令被某个同名 python 包替换导致功能失效的问题,目前看不是这个问题
|
21
Granthese 27 天前
黑苹果?
|
22
sylarc OP @nieyujiang #19 虽然我不太明白,我的可能不是这个情况吧,新系统也这样
|
25
littlewing 19 天前
Macmini M4 最新系统,一样的情况
|
26
sylarc OP @littlewing 看来不是我能解决的了。之前用--adopt 的方式安装代替升级,后来也出错。把 cmt 删除了,竟然能升级了,你可以试试。我用 cask upgrade 批量升级的
|
27
YzhucaiguaiY 16 天前
相同的问题,我是 macos 15.1.1
先手动卸载了 CommandLineTools sudo rm -rf /Library/Developer/CommandLineTools/ 然后重新安装,但是是手动下载新版本包安装的 https://download.developer.apple.com/Developer_Tools/Command_Line_Tools_for_Xcode_16.2/Command_Line_Tools_for_Xcode_16.2.dmg |
28
sylarc OP @YzhucaiguaiY 我这样试过,出现新错误。后来删除 cmt ,正常一次,后来又出错。
今天更新的 15.2 更新了两个软件没出错,还要再观察。 |
29
autumn426 16 天前
|
30
autumn426 16 天前
可以了 M1pro macos15.1.1Homebrew 4.4.11
|
31
sylarc OP 不是完全确认,我的错误原因大概是 OpenCore-Patcher 破坏了系统 sip 造成的,等下次系统升级再确认,这次不小心又打上了补丁,重启前的升级是正常的
|
32
sylarc OP 唉,最新情况,系统 15.2 ,有 opencore-pather
brew install xxxx --adopt 出错:listxattr for destination failed: 2 brew cu -a -y -f 正常运行 懵了,与上次出错之间,没再折腾 |
33
littlewing 2 天前
我已经放弃了,Macmini M4 15.2 intel MacBook Pro 15.2 都是一样的问题,不用 brew cask 了
|
34
sylarc OP @littlewing #33 在用 brew install xxxx --adopt 升级
|