์ค๋๋ง์ Flutter๋ฅผ ๋ค์ ํด๋ณด๋ ค๊ณ ์ค์น๋ฅผ ํ๋ ์์ค์ cocoapods ๋ผ๋๊ฒ ์๋ํ์ง ์๋๋ค๋ ์๋ฌ๋ฅผ ๋ง๋ฌ๋ค.
โฏ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[โ] Flutter (Channel stable, 3.13.7, on macOS 13.6 22G120 darwin-arm64, locale
ko-KR)
[โ] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[!] Xcode - develop for iOS and macOS (Xcode 15.0)
โ CocoaPods installed but not working.
You appear to have CocoaPods installed but it is not working.
This can happen if the version of Ruby that CocoaPods was installed with
is different from the one being used to invoke it.
This can usually be fixed by re-installing CocoaPods.
To re-install see
https://guides.cocoapods.org/using/getting-started.html#installation for
instructions.
[โ] Chrome - develop for the web
[โ] Android Studio (version 2022.3)
[โ] VS Code (version 1.82.2)
[โ] Connected device (2 available)
[โ] Network resources
์ฒ์์๋ ๋์๋กญ์ง ์๊ฒ ์์ ๋์จ ๋งํฌ์ ๋ค์ด๊ฐ์ cocoapods๋ฅผ ์ค์นํ๋๋ ์๋ก์ด ์๋ฌ ๋ฐ์...
โฏ sudo gem install cocoapods
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.6.0/gems/ffi-1.16.3/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20231017-93806-nbnxjy.rb extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
--with-ffi_c-dir
--without-ffi_c-dir
--with-ffi_c-include
--without-ffi_c-include=${ffi_c-dir}/include
--with-ffi_c-lib
--without-ffi_c-lib=${ffi_c-dir}/lib
--enable-debug
--disable-debug
--enable-system-libffi
--disable-system-libffi
--with-libffi-config
--without-libffi-config
--with-pkg-config
--without-pkg-config
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:546:in `block in try_link0'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tmpdir.rb:93:in `mktmpdir'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:543:in `try_link0'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:570:in `try_link'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:672:in `try_ldflags'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1832:in `pkg_config'
from extconf.rb:9:in `system_libffi_usable?'
from extconf.rb:46:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-22/2.6.0/ffi-1.16.3/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.16.3 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-22/2.6.0/ffi-1.16.3/gem_make.out
๊ตฌ๊ธ๋ง ํด๋ณด๋ M1์นฉ์์ ๋ฐ์ํ๋ ์๋ฌ๋ผ๊ณ ํ๋๋ฐ ruby ๋ฒ์ ์ ์ฌ๋ฆฌ๋ฉด ํด๊ฒฐ๋๋ค๊ณ ํ๋ค. ๋ด๊บผ์ ์ค์น๋์ด ์๋ system ruby์ ๋ฒ์ ์ 2.6.10 ์ด๊ณ 2023๋ 10์ ๊ธฐ์ค ์ต์ ๋ฒ์ ruby๋ 3.2.2.
โฏ ruby -v
ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin22]
Ruby๋ฅผ ์ ๋ฐ์ดํธ ํ๋ ค๊ณ ๊ตฌ๊ธ๋ง ์ข ํด๋ดค๋๋ฐ mac์ ๊น๋ ค์๋ system ruby๋ ๊ฑด๋๋ฆฌ์ง ๋ง๋ผ๋ ๊ธ๋ง ์๋ฉ ๋์จ๋ค...
mac์ ๋ ๊ฑฐ์ ์ํํธ์จ์ด๊ฐ ๊ตฌ๋ฒ์ ์ผ๋ก ๋น๋๋์ด์๋๊ฒ ๋ง์์ ruby๋ฒ์ ์ ์ฌ๋ฆฌ๊ฒ ๋๋ฉด ์ ๋๋ก ๋์ํ์ง ์์ ์ ์๋ค๊ณ ํ๋ค. ํ ์ ์์ด pyenv ์ฒ๋ผ ๋ฒ์ ์ ๊ฐ์ํ์์ผ์ ๊ด๋ฆฌํ๋ rbenv๋ฅผ ์ค์นํด์ผ๊ฒ ๋ค.
๋ณ ์๊ฐ์์ด ์์ํ๋๋ฐ ๋ญ๊ฐ ์ ์ ๊ท์ฐฎ์์ง๋ค..
https://github.com/rbenv/rbenv
ํด๋น ์คํ์์ค์ readme๋ฅผ ์ฐธ๊ณ ํด์ ์ต์ ๋ฒ์ ruby๋ก ์ค์นํ๋ค.
โฏ ruby -v
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22]
โฏ sudo gem install cocoapods
...
Done installing documentation for nanaimo, colored2, claide, CFPropertyList, atomos, xcodeproj, ruby-macho, nap, molinillo, gh_inspector, fourflusher, escape, cocoapods-try, netrc, cocoapods-trunk, cocoapods-search, cocoapods-plugins, cocoapods-downloader, cocoapods-deintegrate, ffi, ethon, typhoeus, public_suffix, fuzzy_match, concurrent-ruby, httpclient, algoliasearch, addressable, tzinfo, i18n, connection_pool, activesupport, cocoapods-core, cocoapods after 8 seconds
34 gems installed
cocoapods ๊ฐ ์ฑ๊ณต์ ์ผ๋ก ์ค์น๋์๋ค.
๋ง์ง๋ง์ผ๋ก flutter doctor๋ก flutter๊ฐ ์ ์์ ์ผ๋ก ์ค์น ๋์๋์ง ํ์ธํ๋ค.
โฏ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[โ] Flutter (Channel stable, 3.13.7, on macOS 13.6 22G120 darwin-arm64, locale
ko-KR)
[โ] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[!] Xcode - develop for iOS and macOS (Xcode 15.0)
โ CocoaPods installed but not working.
You appear to have CocoaPods installed but it is not working.
This can happen if the version of Ruby that CocoaPods was installed with
is different from the one being used to invoke it.
This can usually be fixed by re-installing CocoaPods.
To re-install see
https://guides.cocoapods.org/using/getting-started.html#installation for
instructions.
[โ] Chrome - develop for the web
[โ] Android Studio (version 2022.3)
[โ] VS Code (version 1.82.2)
[โ] Connected device (2 available)
[โ] Network resources
! Doctor found issues in 1 category.
????
๋ถ๋ช
ํ cocoapods ์ค์น ๋์๋ค๊ณ ๋ก๊ทธ๊ฐ ์ฐํ๋๋ฐ Xcode๋ ์ฌ์ ํ ์๋๋ค..
โฏ pod --version
/Users/dyms/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/activesupport-7.1.1/lib/active_support/core_ext/array/conversions.rb:108:in `<class:Array>': undefined method `deprecator' for ActiveSupport:Module (NoMethodError)
deprecate to_default_s: :to_s, deprecator: ActiveSupport.deprecator
^^^^^^^^^^^
Did you mean? deprecate_constant
from /Users/dyms/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/activesupport-7.1.1/lib/active_support/core_ext/array/conversions.rb:8:in `<top (required)>'
from <internal:/Users/dyms/.rbenv/versions/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/Users/dyms/.rbenv/versions/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /Users/dyms/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.13.0/lib/cocoapods.rb:9:in `<top (required)>'
from <internal:/Users/dyms/.rbenv/versions/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/Users/dyms/.rbenv/versions/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /Users/dyms/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.13.0/bin/pod:36:in `<top (required)>'
from /Users/dyms/.rbenv/versions/3.2.2/bin/pod:25:in `load'
from /Users/dyms/.rbenv/versions/3.2.2/bin/pod:25:in `<main>'
์กฐ๊ธ ์ ์ ์ค์นํ cocoapods ๋ฅผ ํ์ธํด๋ณด๋ ActiveSupport ๋ผ๋๊ฒ deprecate ๋์๋จ๋ค..
https://github.com/CocoaPods/CocoaPods/issues/12080
์ฐพ์๋ณด๋ ๊ฐ์ฅ ์ต์ ๋ฒ์ gem ์์ ๋ฐ์ํ๋ ์ด์๋ผ๊ณ ํ๋๋ฐ, ์ด๊ฒ๋ง ํธํ๋๋ ๋ฒ์ ์ผ๋ก ๊ต์ฒดํด์ฃผ๋ฉด ๋๋ค๊ณ ํ๋ค.
โฏ sudo gem uninstall activesupport
โฏ sudo gem install activesupport --version 7.0.8
โฏ pod --version
1.13.0
์ด์ ์์ผ cocoapods ๊ฐ ์ ์์ ์ผ๋ก ์๋ํ๋ค.
โฏ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[โ] Flutter (Channel stable, 3.13.7, on macOS 13.6 22G120 darwin-arm64, locale
ko-KR)
[โ] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[โ] Xcode - develop for iOS and macOS (Xcode 15.0)
[โ] Chrome - develop for the web
[โ] Android Studio (version 2022.3)
[โ] VS Code (version 1.82.2)
[โ] Connected device (2 available)
[โ] Network resources
โข No issues found!
๋๋์ด ํด๊ฒฐ!๐