os/macOS
2022. 2. 14. 15:04
https://stackoverflow.com/questions/62700347/unable-to-install-cocoa-pods
Unable to install cocoa pods
I want to install cocoapods on MacOS to run the pod command. But on doing sudo gem install cocoa-pods I get the following: Building native extensions. This could take a while... ERROR: Error inst...
stackoverflow.com
> you may find following boxed commands in above url.
I had a similar issue. I solved by installing the latest version of ruby (2.7.2). First install the Ruby Version Manager rvm: curl -L https://get.rvm.io | bash -s stable To skip having to closing and reopening the terminal, run source ~/.rvm/scripts/rvm Then install the latest version of ruby: rvm install ruby-2.7.2 Finally try again to install the cocoapods: sudo gem install cocoapods |
edi@edis-iMac ~ % vim /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/ffi-1.15.5/mkmf.log edi@edis-iMac ~ % edi@edis-iMac ~ % curl -L https://get.rvm.io | bash -s stable % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 194 100 194 0 0 165 0 0:00:01 0:00:01 --:--:-- 165 100 24535 100 24535 0 0 18337 0 0:00:01 0:00:01 --:--:-- 2178k Downloading https://github.com/rvm/rvm/archive/1.29.12.tar.gz Downloading https://github.com/rvm/rvm/releases/download/1.29.12/1.29.12.tar.gz.asc Found PGP signature at: 'https://github.com/rvm/rvm/releases/download/1.29.12/1.29.12.tar.gz.asc', but no GPG software exists to validate it, skipping. Installing RVM to /Users/edi/.rvm/ Adding rvm PATH line to /Users/edi/.profile /Users/edi/.mkshrc /Users/edi/.bashrc /Users/edi/.zshrc. Adding rvm loading line to /Users/edi/.profile /Users/edi/.bash_profile /Users/edi/.zlogin. Installation of RVM in /Users/edi/.rvm/ is almost complete: * To start using RVM you need to run `source /Users/edi/.rvm/scripts/rvm` in all your open shell windows, in rare cases you need to reopen all shell windows. Thanks for installing RVM 🙏 Please consider donating to our open collective to help us maintain RVM. 👉 Donate: https://opencollective.com/rvm/donate edi@edis-iMac ~ % ruby. -version zsh: command not found: ruby. edi@edis-iMac ~ % ruby -version ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20] Traceback (most recent call last): -e:1:in `<main>': undefined local variable or method `rsion' for main:Object (NameError) edi@edis-iMac ~ % edi@edis-iMac ~ % edi@edis-iMac ~ % edi@edis-iMac ~ % edi@edis-iMac ~ % edi@edis-iMac ~ % edi@edis-iMac ~ % edi@edis-iMac ~ % ruby --version ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20] edi@edis-iMac ~ % edi@edis-iMac ~ % edi@edis-iMac ~ % rvm install ruby-2.7.2 zsh: command not found: rvm edi@edis-iMac ~ % rvm zsh: command not found: rvm edi@edis-iMac ~ % rvm --help zsh: command not found: rvm edi@edis-iMac ~ % source ~/.rvm/scripts/rvm edi@edis-iMac ~ % rvm install ruby-2.7.2 Searching for binary rubies, this might take some time. No binary rubies available for: osx/11.6/x86_64/ruby-2.7.2. Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. Checking requirements for osx. Installing requirements for osx. Updating system - please wait Installing required packages: autoconf, automake, libtool, pkg-config, coreutils, libyaml, libksba, readline, zlib, openssl@1.1 - please wait Certificates bundle '/usr/local/etc/openssl@1.1/cert.pem' is already up to date. Requirements installation successful. Installing Ruby from source to: /Users/edi/.rvm/rubies/ruby-2.7.2, this may take a while depending on your cpu(s)... ruby-2.7.2 - #downloading ruby-2.7.2, this may take a while depending on your connection... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 14.0M 100 14.0M 0 0 6030k 0 0:00:02 0:00:02 --:--:-- 6027k ruby-2.7.2 - #extracting ruby-2.7.2 to /Users/edi/.rvm/src/ruby-2.7.2 - please wait ruby-2.7.2 - #configuring - please wait ruby-2.7.2 - #post-configuration - please wait ruby-2.7.2 - #compiling - please wait ruby-2.7.2 - #installing - please wait ruby-2.7.2 - #making binaries executable - please wait Installed rubygems 3.1.4 is newer than 3.0.9 provided with installed ruby, skipping installation, use --force to force installation. ruby-2.7.2 - #gemset created /Users/edi/.rvm/gems/ruby-2.7.2@global ruby-2.7.2 - #importing gemset /Users/edi/.rvm/gemsets/global.gems - please wait ruby-2.7.2 - #generating global wrappers - please wait ruby-2.7.2 - #gemset created /Users/edi/.rvm/gems/ruby-2.7.2 ruby-2.7.2 - #importing gemsetfile /Users/edi/.rvm/gemsets/default.gems evaluated to empty gem list ruby-2.7.2 - #generating default wrappers - please wait ruby-2.7.2 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake). Install of ruby-2.7.2 - #complete Ruby was built without documentation, to build it run: rvm docs generate-ri edi@edis-iMac ~ % edi@edis-iMac ~ % edi@edis-iMac ~ % edi@edis-iMac ~ % edi@edis-iMac ~ % edi@edis-iMac ~ % sudo gem install cocoapods Password: Fetching concurrent-ruby-1.1.9.gem Fetching tzinfo-2.0.4.gem Fetching zeitwerk-2.5.4.gem ...... Installing ri documentation for cocoapods-1.11.2 Done installing documentation for zeitwerk, concurrent-ruby, tzinfo, i18n, activesupport, nap, fuzzy_match, httpclient, algoliasearch, ffi, ethon, typhoeus, netrc, public_suffix, addressable, cocoapods-core, claide, cocoapods-deintegrate, cocoapods-downloader, cocoapods-plugins, cocoapods-search, cocoapods-trunk, cocoapods-try, molinillo, atomos, rexml, CFPropertyList, colored2, nanaimo, xcodeproj, escape, fourflusher, gh_inspector, ruby-macho, cocoapods after 23 seconds 35 gems installed edi@edis-iMac ~ % flutter doctor -v [✓] Flutter (Channel stable, 2.10.0, on macOS 11.6 20G165 darwin-x64, locale en-US) • Flutter version 2.10.0 at /Users/edi/development/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 5f105a6ca7 (9 days ago), 2022-02-01 14:15:42 -0800 • Engine revision 776efd2034 • Dart version 2.16.0 • DevTools version 2.9.2 [✗] Android toolchain - develop for Android devices ✗ Unable to locate Android SDK. Install Android Studio from: https://developer.android.com/studio/index.html On first launch it will assist you in installing the Android SDK components. (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions). If the Android SDK has been installed to a custom location, please use `flutter config --android-sdk` to update to that location. [✓] Xcode - develop for iOS and macOS (Xcode 13.2.1) • Xcode at /Applications/Xcode.app/Contents/Developer • CocoaPods version 1.11.2 [✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome) ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable. [!] Android Studio (not installed) • Android Studio not found; download from https://developer.android.com/studio/index.html (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions). [!] Connected device ! No devices available [✓] HTTP Host Availability • All required HTTP hosts are available ! Doctor found issues in 4 categories. edi@edis-iMac ~ % edi@edis-iMac ~ % edi@edis-iMac ~ % edi@edis-iMac ~ % edi@edis-iMac ~ % edi@edis-iMac ~ % history 99 brew reinstall libffi 100 export LDFLAGS="-L/usr/local/opt/libffi/lib" 101 export CPPFLAGS="-I/usr/local/opt/libffi/include" 102 sudo gem install cocoapods 103 vim /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/ffi-1.15.5/mkmf.log 104 curl -L https://get.rvm.io | bash -s stable 105 ruby. -version 106 ruby -version 107 ruby --version 108 rvm install ruby-2.7.2 109 rvm 110 rvm --help 111 source ~/.rvm/scripts/rvm 112 rvm install ruby-2.7.2 113 sudo gem install cocoapods 114 flutter doctor -v edi@edis-iMac ~ % kkk zsh: command not found: kkk edi@edis-iMac ~ % edi@edis-iMac ~ % edi@edis-iMac ~ % pwd /Users/edi edi@edis-iMac ~ % ll zsh: command not found: ll edi@edis-iMac ~ % pwd /Users/edi edi@edis-iMac ~ % cd development edi@edis-iMac development % ll zsh: command not found: ll edi@edis-iMac development % ls -al total 0 drwxr-xr-x 3 edi staff 96 Feb 4 17:30 . drwxr-xr-x+ 32 edi staff 1024 Feb 11 15:50 .. drwxr-xr-x@ 28 edi staff 896 Feb 3 08:13 flutter edi@edis-iMac development % vim flutter-install-error-resolve.txt edi@edis-iMac development % edi@edis-iMac development % edi@edis-iMac development % edi@edis-iMac development % edi@edis-iMac development % edi@edis-iMac development % edi@edis-iMac development % edi@edis-iMac development % edi@edis-iMac development % edi@edis-iMac development % flutter doctor -v [✓] Flutter (Channel stable, 2.10.0, on macOS 11.6 20G165 darwin-x64, locale en-US) • Flutter version 2.10.0 at /Users/edi/development/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 5f105a6ca7 (9 days ago), 2022-02-01 14:15:42 -0800 • Engine revision 776efd2034 • Dart version 2.16.0 • DevTools version 2.9.2 [✗] Android toolchain - develop for Android devices ✗ Unable to locate Android SDK. Install Android Studio from: https://developer.android.com/studio/index.html On first launch it will assist you in installing the Android SDK components. (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions). If the Android SDK has been installed to a custom location, please use `flutter config --android-sdk` to update to that location. [✓] Xcode - develop for iOS and macOS (Xcode 13.2.1) • Xcode at /Applications/Xcode.app/Contents/Developer • CocoaPods version 1.11.2 [✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome) ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable. [!] Android Studio (not installed) • Android Studio not found; download from https://developer.android.com/studio/index.html (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions). [!] Connected device ! No devices available [✓] HTTP Host Availability • All required HTTP hosts are available ! Doctor found issues in 4 categories. edi@edis-iMac development % edi@edis-iMac development % edi@edis-iMac development % edi@edis-iMac development % edi@edis-iMac development % edi@edis-iMac development % edi@edis-iMac development % edi@edis-iMac development % edi@edis-iMac development % edi@edis-iMac development % edi@edis-iMac development % edi@edis-iMac development % edi@edis-iMac development % edi@edis-iMac development % edi@edis-iMac development % pwd /Users/edi/development edi@edis-iMac development % ll zsh: command not found: ll edi@edis-iMac development % ls -al total 8 drwxr-xr-x 4 edi staff 128 Feb 11 16:07 . drwxr-xr-x+ 32 edi staff 1024 Feb 11 16:07 .. drwxr-xr-x@ 28 edi staff 896 Feb 3 08:13 flutter -rw-r--r-- 1 edi staff 501 Feb 11 16:07 flutter-install-error-resolve.txt edi@edis-iMac development % pwd /Users/edi/development edi@edis-iMac development % cd flutter edi@edis-iMac flutter % pwd /Users/edi/development/flutter edi@edis-iMac flutter % cd examples edi@edis-iMac examples % ls -al edi@edis-iMac flutter % . s .: no such file or directory: s edi@edis-iMac flutter % ls -al total 432 drwxr-xr-x@ 28 edi staff 896 Feb 3 08:13 . drwxr-xr-x 4 edi staff 128 Feb 11 16:07 .. -rw-r--r--@ 1 edi staff 6 Feb 11 16:08 version edi@edis-iMac flutter % pwd /Users/edi/development/flutter edi@edis-iMac flutter % cd .. edi@edis-iMac development % ls -al total 8 drwxr-xr-x 4 edi staff 128 Feb 11 16:07 . drwxr-xr-x+ 32 edi staff 1024 Feb 11 16:07 .. drwxr-xr-x@ 28 edi staff 896 Feb 3 08:13 flutter -rw-r--r-- 1 edi staff 501 Feb 11 16:07 flutter-install-error-resolve.txt edi@edis-iMac development % pwd /Users/edi/development edi@edis-iMac development % ls -al total 8 drwxr-xr-x 4 edi staff 128 Feb 11 16:07 . drwxr-xr-x+ 32 edi staff 1024 Feb 11 16:07 .. drwxr-xr-x@ 28 edi staff 896 Feb 3 08:13 flutter -rw-r--r-- 1 edi staff 501 Feb 11 16:07 flutter-install-error-resolve.txt edi@edis-iMac development % cd flutter edi@edis-iMac flutter % pwd /Users/edi/development/flutter edi@edis-iMac flutter % cd .. edi@edis-iMac development % mkdir flutter-src edi@edis-iMac development % cd flutter-src edi@edis-iMac flutter-src % ls -al total 0 drwxr-xr-x 2 edi staff 64 Feb 11 16:41 . drwxr-xr-x 5 edi staff 160 Feb 11 16:41 .. edi@edis-iMac flutter-src % cd .. edi@edis-iMac development % mv flutter-src src-flutter edi@edis-iMac development % cd src-flutter edi@edis-iMac src-flutter % ll zsh: command not found: ll edi@edis-iMac src-flutter % flutter create my_app Signing iOS app for device deployment using developer identity: "Apple Development: cskimair@gmail.com (SM2524SSV5)" Creating project my_app... Running "flutter pub get" in my_app... 2,140ms Wrote 96 files. All done! In order to run your application, type: $ cd my_app $ flutter run Your application code is in my_app/lib/main.dart. edi@edis-iMac src-flutter % edi@edis-iMac src-flutter % cd my_app edi@edis-iMac my_app % flutter run Launching lib/main.dart on iPod touch (7th generation) in debug mode... Running Xcode build... └─Compiling, linking and signing... 41.8s Xcode build done. 65.8s Syncing files to device iPod touch (7th generation)... 391ms Flutter run key commands. r Hot reload. 🔥🔥🔥 R Hot restart. h List all available interactive commands. d Detach (terminate "flutter run" but leave application running). c Clear the screen q Quit (terminate the application on the device). 💪 Running with sound null safety 💪 An Observatory debugger and profiler on iPod touch (7th generation) is available at: http://127.0.0.1:50188/_wuSsBot2YQ=/ The Flutter DevTools debugger and profiler on iPod touch (7th generation) is available at: http://127.0.0.1:9100?uri=http://127.0.0.1:50188/_wuSsBot2YQ=/ Application finished. edi@edis-iMac my_app % [Restored Feb 14, 2022 2:04:40 PM] Last login: Mon Feb 14 14:04:38 on console Restored session: Fri Feb 11 18:35:04 KST 2022 edi@edis-iMac my_app % flutter run ╔════════════════════════════════════════════════════════════════════════════╗ ║ A new version of Flutter is available! ║ ║ ║ ║ To update to the latest version, run "flutter upgrade". ║ ╚════════════════════════════════════════════════════════════════════════════╝ Launching lib/main.dart on iPod touch (7th generation) in debug mode... Running Xcode build... └─Compiling, linking and signing... 5.2s Xcode build done. 12.2s Syncing files to device iPod touch (7th generation)... 137ms Flutter run key commands. r Hot reload. 🔥🔥🔥 R Hot restart. h List all available interactive commands. d Detach (terminate "flutter run" but leave application running). c Clear the screen q Quit (terminate the application on the device). 💪 Running with sound null safety 💪 An Observatory debugger and profiler on iPod touch (7th generation) is available at: http://127.0.0.1:49378/Qd1HhWGJ6Vg=/ The Flutter DevTools debugger and profiler on iPod touch (7th generation) is available at: http://127.0.0.1:9100?uri=http://127.0.0.1:49378/Qd1HhWGJ6Vg=/ Application finished. edi@edis-iMac my_app % |
---
'os > macOS' 카테고리의 다른 글
| Flutter / AndroidStudio 에서 안드로이드 가상머신설정이 안될때 (0) | 2022.04.15 |
|---|---|
| Module 'path_provider_ios' not found (0) | 2022.04.07 |
| Flutter bluetooth sample - modified(for build success) and tested (0) | 2022.01.17 |
| Flutter - Bluetooth not enabled in iOS Simulator (0) | 2022.01.17 |
| Hackintosh (0) | 2021.12.28 |
