Homebrew / homebrew-core

🍻 Default formulae for the missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
13.75k stars 12.44k forks source link

Cocoapods doesn't work on Catalina #42906

Closed SConaway closed 5 years ago

SConaway commented 5 years ago

The brewed version of cocoapods uses an incorrect, non-existent version of ruby on Catalina and installation from source fails.

bash-3.2$ which ruby
/usr/bin/ruby
bash-3.2$ ruby --version
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
bash-3.2$ brew install cocoapods
Warning: You are using macOS 10.15.
We do not provide support for this pre-release version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience, as you are running this pre-release version.

==> Downloading https://homebrew.bintray.com/bottles/cocoapods-1.7.5.mojave.bottle.tar.gz
Already downloaded: /Users/steven/Library/Caches/Homebrew/downloads/1b04eba9a95942eee9c9fb8d2ece6cf001a016f2afcdfc8ee42aff324ce1f943--cocoapods-1.7.5.mojave.bottle.tar.gz
==> Pouring cocoapods-1.7.5.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/cocoapods/1.7.5: 9,789 files, 14.8MB
bash-3.2$ pod
/usr/local/bin/pod: /usr/local/Cellar/cocoapods/1.7.5/libexec/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/pod: line 2: /usr/local/Cellar/cocoapods/1.7.5/libexec/bin/pod: Undefined error: 0
bash-3.2$ brew uninstall cocoapods
Uninstalling /usr/local/Cellar/cocoapods/1.7.5... (9,789 files, 14.8MB)
bash-3.2$ brew install cocoapods -s
Warning: You are using macOS 10.15.
We do not provide support for this pre-release version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience, as you are running this pre-release version.

Error: Your Xcode (10.2.1) is too outdated.
Please update to Xcode 11.0 (or delete it).
Xcode can be updated from:
  https://developer.apple.com/download/more/

bash-3.2$ sudo xcode-select --switch /Applications/Xcode-beta.app
bash-3.2$ echo $?
0
bash-3.2$ sudo xcodebuild -license accept
bash-3.2$ echo $?
0
bash-3.2$ brew install cocoapods -s
Warning: You are using macOS 10.15.
We do not provide support for this pre-release version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience, as you are running this pre-release version.

==> Downloading https://github.com/CocoaPods/CocoaPods/archive/1.7.5.tar.gz
==> Downloading from https://codeload.github.com/CocoaPods/CocoaPods/tar.gz/1.7.5
######################################################################## 100.0%
==> gem build cocoapods.gemspec
==> gem install cocoapods-1.7.5.gem
Error: An exception occurred within a child process:
  Errno::ENOENT: No such file or directory - /usr/local/Cellar/cocoapods/1.7.5/libexec/bin/xcodeproj
bash-3.2$ brew install cocoapods -s -vvv
Warning: You are using macOS 10.15.
We do not provide support for this pre-release version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience, as you are running this pre-release version.

/usr/bin/sandbox-exec -f /private/tmp/homebrew20190807-11875-pq3s1a.sb nice /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -W0 -I /usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/simplecov-cobertura-1.3.1/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ruby-macho-2.2.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-rspec-1.35.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-performance-1.4.1/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-0.74.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/unicode-display_width-1.6.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-wait-0.0.9/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-retry-0.6.1/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-its-1.3.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-3.8.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-mocks-3.8.1/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-expectations-3.8.4/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-core-3.8.2/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-support-3.8.2/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ronn-0.7.3/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rdiscount-2.2.0.1/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/universal-darwin-18/2.3.0/rdiscount-2.2.0.1:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rainbow-3.0.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/plist-3.5.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/parser-2.6.3.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/parallel_tests-2.29.1/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/parallel-1.17.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mustache-1.1.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mechanize-2.7.6/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/webrobots-0.1.2/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ntlm-http-0.1.1/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/nokogiri-1.10.3/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/universal-darwin-18/2.3.0/nokogiri-1.10.3:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mini_portile2-2.4.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/net-http-persistent-3.1.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/net-http-digest_auth-1.4.1/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mime-types-3.2.2/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mime-types-data-3.2019.0331/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/jaro_winkler-1.5.3/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/universal-darwin-18/2.3.0/jaro_winkler-1.5.3:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/http-cookie-1.0.3/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/hpricot-0.8.6/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/universal-darwin-18/2.3.0/hpricot-0.8.6:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/domain_name-0.5.20190701/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/unf-0.1.4/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/unf_ext-0.0.7.6/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/universal-darwin-18/2.3.0/unf_ext-0.0.7.6:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/diff-lcs-1.3/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/coveralls-0.8.23/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/thor-0.20.3/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/term-ansicolor-1.7.1/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/tins-1.21.1/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/simplecov-0.16.1/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/simplecov-html-0.10.2/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/docile-1.3.2/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/json-2.2.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/universal-darwin-18/2.3.0/json-2.2.0:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/connection_pool-2.2.2/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/backports-3.15.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ast-2.4.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/activesupport-5.2.3/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/tzinfo-1.2.5/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/thread_safe-0.3.6/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/minitest-5.11.3/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/i18n-1.6.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib:/Library/Ruby/Site/2.6.0:/Library/Ruby/Site/2.6.0/x86_64-darwin19:/Library/Ruby/Site/2.6.0/universal-darwin19:/Library/Ruby/Site:/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby/2.6.0:/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby/2.6.0/x86_64-darwin19:/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby/2.6.0/universal-darwin19:/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby:/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0:/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/x86_64-darwin19:/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin19:/usr/local/Homebrew/Library/Homebrew -- /usr/local/Homebrew/Library/Homebrew/build.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/cocoapods.rb --verbose
==> Downloading https://github.com/CocoaPods/CocoaPods/archive/1.7.5.tar.gz
Already downloaded: /Users/steven/Library/Caches/Homebrew/downloads/464b21bd8edf9957e4ab1e3212e0106f1bfb6ea718e7a461f36487f3ec55234f--CocoaPods-1.7.5.tar.gz
==> Verifying 464b21bd8edf9957e4ab1e3212e0106f1bfb6ea718e7a461f36487f3ec55234f--CocoaPods-1.7.5.tar.gz checksum
tar xof /Users/steven/Library/Caches/Homebrew/downloads/464b21bd8edf9957e4ab1e3212e0106f1bfb6ea718e7a461f36487f3ec55234f--CocoaPods-1.7.5.tar.gz -C /private/tmp/d20190807-11876-mun4gy
cp -pR /private/tmp/d20190807-11876-mun4gy/CocoaPods-1.7.5/. /private/tmp/cocoapods-20190807-11876-wl54tf/CocoaPods-1.7.5
chmod -Rf +w /private/tmp/d20190807-11876-mun4gy
==> gem build cocoapods.gemspec
  Successfully built RubyGem
  Name: cocoapods
  Version: 1.7.5
  File: cocoapods-1.7.5.gem
==> gem install cocoapods-1.7.5.gem
Successfully installed cocoapods-1.7.5
Parsing documentation for cocoapods-1.7.5
Installing ri documentation for cocoapods-1.7.5
Done installing documentation for cocoapods after 4 seconds
1 gem installed
Error: An exception occurred within a child process:
  Errno::ENOENT: No such file or directory - /usr/local/Cellar/cocoapods/1.7.5/libexec/bin/xcodeproj
bash-3.2$ pod
bash: /usr/local/bin/pod: No such file or directory
bash-3.2$ brew config
brew dHOMEBREW_VERSION: 2.1.9-17-g7e267b3
ORIGIN: https://github.com/Homebrew/brew
HEAD: 7e267b38588b6ac49fc784dbcffb461af6a7eca4
oLast commit: 10 hours ago
cCore tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: ede242347ad14e937f97441ab01a5b11f76240c3
Core tap last commit: 4 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DEV_CMD_RUN: 1
HOMEBREW_NO_ANALYTICS_THIS_RUN: 1
CPU: quad-core 64-bit kabylake
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
Clang: 11.0 build 1100
Git: 2.22.0 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 1.8.0_202
tmacOS: 10.15-x86_64
CLT: N/A
Xcode: 11.0 => /Applications/Xcode-beta.app/Contents/Developer
XQuartz: 2.7.11 => /opt/X11
bash-3.2$ brew doctor
bash-3.2$ brew config
HOMEBREW_VERSION: 2.1.9-17-g7e267b3
ORIGIN: https://github.com/Homebrew/brew
HEAD: 7e267b38588b6ac49fc784dbcffb461af6a7eca4
Last commit: 10 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: ede242347ad14e937f97441ab01a5b11f76240c3
Core tap last commit: 4 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DEV_CMD_RUN: 1
HOMEBREW_NO_ANALYTICS_THIS_RUN: 1
CPU: quad-core 64-bit kabylake
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
Clang: 11.0 build 1100
Git: 2.22.0 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 1.8.0_202
macOS: 10.15-x86_64
CLT: N/A
Xcode: 11.0 => /Applications/Xcode-beta.app/Contents/Developer
XQuartz: 2.7.11 => /opt/X11
bash-3.2$ brew doctor
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: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
  /usr/local/include/python2.7/pygame/_camera.h
  /usr/local/include/python2.7/pygame/_pygame.h
  /usr/local/include/python2.7/pygame/_surface.h
  /usr/local/include/python2.7/pygame/bitmask.h
  /usr/local/include/python2.7/pygame/camera.h
  /usr/local/include/python2.7/pygame/fastevents.h
  /usr/local/include/python2.7/pygame/font.h
  /usr/local/include/python2.7/pygame/freetype.h
  /usr/local/include/python2.7/pygame/mask.h
  /usr/local/include/python2.7/pygame/mixer.h
  /usr/local/include/python2.7/pygame/palette.h
  /usr/local/include/python2.7/pygame/pgarrinter.h
  /usr/local/include/python2.7/pygame/pgbufferproxy.h
  /usr/local/include/python2.7/pygame/pgcompat.h
  /usr/local/include/python2.7/pygame/pgopengl.h
  /usr/local/include/python2.7/pygame/pygame.h
  /usr/local/include/python2.7/pygame/scrap.h
  /usr/local/include/python2.7/pygame/surface.h
  /usr/local/include/python3.7m/pygame/_camera.h
  /usr/local/include/python3.7m/pygame/_pygame.h
  /usr/local/include/python3.7m/pygame/_surface.h
  /usr/local/include/python3.7m/pygame/bitmask.h
  /usr/local/include/python3.7m/pygame/camera.h
  /usr/local/include/python3.7m/pygame/fastevents.h
  /usr/local/include/python3.7m/pygame/font.h
  /usr/local/include/python3.7m/pygame/freetype.h
  /usr/local/include/python3.7m/pygame/mask.h
  /usr/local/include/python3.7m/pygame/mixer.h
  /usr/local/include/python3.7m/pygame/palette.h
  /usr/local/include/python3.7m/pygame/pgarrinter.h
  /usr/local/include/python3.7m/pygame/pgbufferproxy.h
  /usr/local/include/python3.7m/pygame/pgcompat.h
  /usr/local/include/python3.7m/pygame/pgopengl.h
  /usr/local/include/python3.7m/pygame/pygame.h
  /usr/local/include/python3.7m/pygame/scrap.h
  /usr/local/include/python3.7m/pygame/surface.h

Warning: You are using macOS 10.15.
We do not provide support for this pre-release version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience, as you are running this pre-release version.

Warning: Ruby version 2.6.3 is unsupported on 10.15. Homebrew
is developed and tested on Ruby 2.3.7, and may not work correctly
on other Rubies. Patches are accepted as long as they don't cause breakage
on supported Rubies.

Warning: Homebrew's sbin was not found in your PATH but you have installed
formulae that put executables in /usr/local/sbin.
Consider setting the PATH for example like so:
  echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile

Warning: Broken symlinks were found. Remove them with `brew cleanup`:
  /usr/local/lib/ruby/gems/2.6.0/bin/bundle
  /usr/local/lib/ruby/gems/2.6.0/bin/bundler
SMillerDev commented 5 years ago

Catalina isn't released yet and therefore not supported by homebrew. If you want this fixed you'll have to file a pull request.

SConaway commented 5 years ago

I'm aware. Will this be fixed by a re-bottling?

SMillerDev commented 5 years ago

Probably, we'll have to see once it's officially released.

andyepx commented 5 years ago

This solution works for now - on Catalina: brew install ruby sudo gem install -n /usr/local/bin cocoapods

When installing the cocoapods gem, say yes to overwrite the pod executable.

SConaway commented 5 years ago

@andyepx

If you're going to use gem, just don't use brew. This is redundant and can cause more problems.

alvarezac1 commented 5 years ago

👋 Did anyone get the error No such module after installing cocoapods and upgrading to Catalina? I'm trying to add pod 'SwiftSoup' pod into my Xcode project. I was able to add the pod (screen shot 1) but then get an error when trying to import the pod in Xcode (screen shot 2). I've been reading on Overstackflow and still haven't found an answer. I did use the sudo gem install cocoapods command in terminal but still got these errors. I opened workspace not project.

Screen shot 1 image

Screen shot 2 image