折腾:
【未解决】Xcode换9.2后代码编译报错:Module compiled with Swift 4.0 cannot be imported in Swift 3.2.3
期间,去参考:
【已解决】Carthage提示:Please update to the latest Carthage version
结果报错:
➜ SRT git:(master) ✗ brew upgrade carthage
Error: carthage 0.25.0 already installed
搜:
Error: carthage 0.25.0 already installed
Error carthage already installed
Error while updating Carthage · Issue #1589 · Carthage/Carthage
说是可能用了两种安装方法,所以混用了。
➜ SRT git:(master) ✗ carthage version
Please update to the latest Carthage version: 0.26.2. You currently are on 0.24.0
0.24.0
brew upgrade Error carthage already installed
算了,再去安装试试
➜ SRT git:(master) ✗ brew install carthage
Warning: carthage 0.25.0 is already installed, it’s just not linked.
You can use `brew link carthage` to link this version.
➜ SRT git:(master) ✗ brew link carthage
Linking /usr/local/Cellar/carthage/0.25.0…
Error: Could not symlink bin/carthage
Target /usr/local/bin/carthage
is a symlink belonging to carthage. You can unlink it:
brew unlink carthage
To force the link and overwrite all conflicting files:
brew link –overwrite carthage
To list all files that would be deleted:
brew link –overwrite –dry-run carthage
➜ SRT git:(master) ✗ brew unlink carthage
Unlinking /usr/local/Cellar/carthage/0.25.0… 0 symlinks removed
➜ SRT git:(master) ✗ brew link carthage
Linking /usr/local/Cellar/carthage/0.25.0…
Error: Could not symlink bin/carthage
Target /usr/local/bin/carthage
is a symlink belonging to carthage. You can unlink it:
brew unlink carthage
To force the link and overwrite all conflicting files:
brew link –overwrite carthage
To list all files that would be deleted:
brew link –overwrite –dry-run carthage
➜ SRT git:(master) ✗ brew link –overwrite carthage
Linking /usr/local/Cellar/carthage/0.25.0… 128 symlinks created
然后接着去看看版本
➜ SRT git:(master) ✗ carthage version
Please update to the latest Carthage version: 0.26.2. You currently are on 0.25.0
0.25.0
然后去升级:
➜ SRT git:(master) ✗ brew upgrade carthage
Error: carthage 0.25.0 already installed
算了,先去卸载,再去安装
➜ SRT git:(master) ✗ brew uninstall carthage
Uninstalling /usr/local/Cellar/carthage/0.25.0… (69 files, 23MB)
carthage 0.24.0, 0.16.2 2 are still installed.
Remove all versions with `brew uninstall –force carthage`.
➜ SRT git:(master) ✗ brew uninstall –force carthage
Uninstalling carthage… (108 files, 34.3MB)
➜ SRT git:(master) ✗ brew install carthage
==> Downloading https://homebrew.bintray.com/bottles/carthage-0.25.0.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring carthage-0.25.0.high_sierra.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
zsh completions have been installed to:
/usr/local/share/zsh/site-functions
==> Summary
🍺 /usr/local/Cellar/carthage/0.25.0: 75 files, 25.8MB
➜ SRT git:(master) ✗ carthage version
0.25.0
【总结】
此处貌似之前由于别的未知原因用了2种方式去安装了carthage。
一个是终端中可以监测到的24,另外一个是25
然后终端中每次用carthage都提示让升级到最新的26.2
然后最终解决办法是:
卸载后重装
brew uninstall –force carthage
brew install carthage
再去查看版本:
carthage version
转载请注明:在路上 » 【已解决】brew upgrade carthage出错:Error carthage 0.25.0 already installed