Xcode 8 cocoapods abort trap: 6

2019-01-21 20:58发布

localhost:PodTest3 haiwang$ pod install
Analyzing dependencies
Downloading dependencies
Installing MBProgressHUD (0.9.2)
Installing Masonry (1.0.2)
Generating Pods project
Abort trap: 6

After upgrading to Xcode 8, cocoapods doesn't work anymore. I have tried to uninstall and install, but it still doesn't work.

17条回答
霸刀☆藐视天下
2楼-- · 2019-01-21 21:32

It's problem with ruby in version 2.0.0 and cocoapods 1.1.1, so if you won't use prerelease version of cocoapods, just update your ruby version for example with rvm:

\curl -sSL https://get.rvm.io | bash -s stable

Remember: After install of new ruby you need to install all gems one more time.

查看更多
混吃等死
3楼-- · 2019-01-21 21:34

If you are an using old version of cocoapods and an old version of xCode you may find after updating to new cocoapods version it complains about your Podfile syntax.

In this situation, another alternative to solve the problem is to keep using the old cocoapods version and set the path to the old xCode version so that cocoapods uses old xctools versions for workspace modifications.

i.e. don't update cocoapods (keep using old version - e.g. 0.39.0) and instead run this command to point to different Xcode version:

sudo xcode-select --switch "path to old version of Xcode.app"
查看更多
4楼-- · 2019-01-21 21:35

Uninstall the cocoapods and reinstall:

gem uninstall cocoapods

gem install cocoapods
查看更多
仙女界的扛把子
5楼-- · 2019-01-21 21:42

download xcode8-beta.

localhost:Applications haiwang$ sudo xcode-select -switch /Applications/Xcode-beta.app/Contents/Developer
    localhost:Applications haiwang$ xcode-select -p /Applications/Xcode-beta.app/Contents/Developer

Please close any current Xcode sessions and use `PodTest7.xcworkspace` for this project from now on.

It is OK.

查看更多
Evening l夕情丶
6楼-- · 2019-01-21 21:43

I ran into this error when I installed cocoapods with brew.

running brew uninstall cocoapods then sudo gem install cocoapods fixed the issue.

查看更多
欢心
7楼-- · 2019-01-21 21:43

I tried all this things but none of them worked for me, this one did:

sudo gem update
查看更多
登录 后发表回答