$sudo gem install cocoapods Fetching: httpclient-2.8.3.gem (100%) Successfully installed httpclient-2.8.3 Fetching: algoliasearch-1.27.1.gem (100%) Successfully installed algoliasearch-1.27.1 Fetching: ffi-1.12.2.gem (100%) Building native extensions. This could take a while... ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension. current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.12.2/ext/ffi_c /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20200401-48828-flwofy.rb extconf.rb mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h extconf failed, exit code 1 Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/ffi-1.12.2 for inspection. Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/ffi-1.12.2/gem_make.out
라며 에러를 뱉고 있어서 열심히 구글링해보니
MAC 버젼 오류였음.. Mojave에서는 저렇게 최신버젼 설치하면 에러남.
그냥 1.8.4로 설치해서 해결완료
sudo gem install cocoapods -v 1.8.4 Fetching: cocoapods-core-1.8.4.gem (100%) Successfully installed cocoapods-core-1.8.4 Fetching: cocoapods-trunk-1.4.1.gem (100%) Successfully installed cocoapods-trunk-1.4.1 Fetching: fourflusher-2.3.1.gem (100%) Successfully installed fourflusher-2.3.1 Fetching: cocoapods-1.8.4.gem (100%) Successfully installed cocoapods-1.8.4 Parsing documentation for cocoapods-core-1.8.4 Installing ri documentation for cocoapods-core-1.8.4 Parsing documentation for cocoapods-trunk-1.4.1 Installing ri documentation for cocoapods-trunk-1.4.1 Parsing documentation for fourflusher-2.3.1 Installing ri documentation for fourflusher-2.3.1 Parsing documentation for cocoapods-1.8.4 Installing ri documentation for cocoapods-1.8.4 Done installing documentation for cocoapods-core, cocoapods-trunk, fourflusher, cocoapods after 8 seconds 4 gems installed