flutter 你好,我正在尝试运行我的应用程序,但它显示你的cocapods是currupted

ih99xse1  于 2023-06-24  发布在  Flutter
关注(0)|答案(1)|浏览(240)

maulikkoladiya@MacBook-Pro pokedex-master % sudo gem install cocoapods ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory.
when i tried to run my app it shows
Warning: CocoaPods is installed but broken. Skipping pod install. 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.
maulikkoladiya@MacBook-Pro pokedex-master % gem list

*** LOCAL GEMS ***

activesupport (6.1.7.3) addressable (2.8.4) algoliasearch (1.27.5) atomos (0.1.3) CFPropertyList (2.3.6) claide (1.1.0) cocoapods (1.12.1, 1.11.3) cocoapods-core (1.12.1) cocoapods-deintegrate (1.0.5) cocoapods-downloader (1.6.3) cocoapods-plugins (1.0.0) cocoapods-search (1.0.1) cocoapods-trunk (1.6.0) cocoapods-try (1.2.0) colored2 (3.1.2) concurrent-ruby (1.2.2) escape (0.0.4) ethon (0.16.0) ffi (1.15.5) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) httpclient (2.8.3) i18n (1.14.1) json (2.6.3) libxml-ruby (3.2.1) mini_portile2 (2.8.0) minitest (5.18.0) molinillo (0.8.0) mygem (0.0.1) nanaimo (0.3.0) nap (1.1.0) netrc (0.11.0) nokogiri (1.13.8) public_suffix (4.0.7) rexml (3.2.5) ruby-macho (2.5.1) sqlite3 (1.3.13) typhoeus (1.4.0) tzinfo (2.0.6) xcodeproj (1.22.0) zeitwerk (2.6.8)
these are gems in my mac(intell chip) i idk shoud i have to delete them all or not
i tried thise things maulikkoladiya@MacBook-Pro pokedex-master % sudo gem install cocoapods Password: ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory. maulikkoladiya@MacBook-Pro pokedex-master % gem install cocoapods
ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory. maulikkoladiya@MacBook-Pro pokedex-master % echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/”YOUR USER FORLDER”/.zprofile
zsh: permission denied: /Users/”YOUR maulikkoladiya@MacBook-Pro pokedex-master % brew install cocoapods
zsh: command not found: brew maulikkoladiya@MacBook-Pro pokedex-master % export GEM_HOME="$HOME/.gem" maulikkoladiya@MacBook-Pro pokedex-master % gem install cocoapods
Successfully installed cocoapods-1.12.1 Parsing documentation for cocoapods-1.12.1 Done installing documentation for cocoapods after 3 seconds 1 gem installed maulikkoladiya@MacBook-Pro pokedex-master % sudo gem install cocoapods Password: ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory. maulikkoladiya@MacBook-Pro pokedex-master % brew install chruby ruby-install zsh: command not found: brew maulikkoladiya@MacBook-Pro pokedex-master % brew install cocoapods
zsh: command not found: brew maulikkoladiya@MacBook-Pro pokedex-master % gem install cocoapods

Successfully installed cocoapods-1.12.1 Parsing documentation for cocoapods-1.12.1 Done installing documentation for cocoapods after 2 seconds 1 gem installed maulikkoladiya@MacBook-Pro pokedex-master % sudo gem uninstall cocoapods && sudo gem install cocoapods Gem 'cocoapods' is not installed ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory. maulikkoladiya@MacBook-Pro pokedex-master % open /Applications/Android\ Studio.app maulikkoladiya@MacBook-Pro pokedex-master % flutter clean Cleaning Xcode workspace... 5.3s Cleaning Xcode workspace... 5.8s Deleting build... 32ms Deleting .dart_tool... 26ms Deleting Generated.xcconfig... 0ms Deleting flutter_export_environment.sh... 0ms Deleting ephemeral... 0ms Deleting ephemeral... 1ms Deleting .flutter-plugins-dependencies... 0ms Deleting .flutter-plugins... 1ms maulikkoladiya@MacBook-Pro pokedex-master % flutter pub get Resolving dependencies... (1.0s) audio_video_progress_bar 0.10.0 (1.0.1 available) audioplayers 1.2.0 (4.1.0 available) audioplayers_android 1.1.3 (3.0.2 available) audioplayers_darwin 1.0.4 (4.1.0 available) audioplayers_linux 1.0.2 (2.1.0 available) audioplayers_platform_interface 2.1.0 (5.0.1 available) audioplayers_web 2.1.0 (3.1.0 available) audioplayers_windows 1.1.1 (2.0.2 available) cli_util 0.3.5 (0.4.0 available) collection 1.17.1 (1.17.2 available) dio 4.0.6 (5.2.1+1 available) file 6.1.4 (7.0.0 available) flutter_launcher_icons 0.10.0 (0.13.1 available) flutter_native_splash 2.2.16 (2.3.1 available) flutter_svg 1.1.6 (2.0.7 available) http 0.13.6 (1.0.0 available) image 3.3.0 (4.0.17 available) lottie 1.4.3 (2.4.0 available) matcher 0.12.15 (0.12.16 available) material_color_utilities 0.2.0 (0.6.0 available) source_span 1.9.1 (1.10.0 available) test_api 0.5.1 (0.6.0 available) Got dependencies! maulikkoladiya@MacBook-Pro pokedex-master % gem list

*** LOCAL GEMS ***

activesupport (6.1.7.3) addressable (2.8.4) algoliasearch (1.27.5) atomos (0.1.3) CFPropertyList (2.3.6) claide (1.1.0) cocoapods (1.12.1, 1.11.3) cocoapods-core (1.12.1) cocoapods-deintegrate (1.0.5) cocoapods-downloader (1.6.3) cocoapods-plugins (1.0.0) cocoapods-search (1.0.1) cocoapods-trunk (1.6.0) cocoapods-try (1.2.0) colored2 (3.1.2) concurrent-ruby (1.2.2) escape (0.0.4) ethon (0.16.0) ffi (1.15.5) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) httpclient (2.8.3) i18n (1.14.1) json (2.6.3) libxml-ruby (3.2.1) mini_portile2 (2.8.0) minitest (5.18.0) molinillo (0.8.0) mygem (0.0.1) nanaimo (0.3.0) nap (1.1.0) netrc (0.11.0) nokogiri (1.13.8) public_suffix (4.0.7) rexml (3.2.5) ruby-macho (2.5.1) sqlite3 (1.3.13) typhoeus (1.4.0) tzinfo (2.0.6) xcodeproj (1.22.0) zeitwerk (2.6.8) maulikkoladiya@MacBook-Pro pokedex-master % sudo gem uninstall ERROR: While executing gem ... (Gem::CommandLineError) Please specify at least one gem name (e.g. gem build GEMNAME) maulikkoladiya@MacBook-Pro pokedex-master % sudo gem uninstall cocoapods Gem 'cocoapods' is not installed maulikkoladiya@MacBook-Pro pokedex-master % sudo gem uninstall cocoapods Gem 'cocoapods' is not installed maulikkoladiya@MacBook-Pro pokedex-master % sudo gem install cocoapods ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory. maulikkoladiya@MacBook-Pro pokedex-master % pod install [!] No `Podfile' found in the project directory.
but it didnt worked at all . so, does anyone knows how to deal with this ? Any help will be appreciated!

n3ipq98p

n3ipq98p1#

错误代码:the CocoaPods is installed but broken. Try reinstalling the CocoaPods
运行以下命令卸载并安装CocoaPods。

sudo gem uninstall cocoapods && sudo gem install cocoapods

对于您遇到的Gem问题,请尝试更新ruby文件

brew update
brew install ruby

相关问题