what's happening with pod? - ios

this is my Podfile
# Uncomment this line to define a global platform for your project
# platform :ios, '10.0'
# Pods for BandUJam
target 'BandUJam' do
pod 'Masonry'
pod 'SDWebImage'
pod 'VODUpload'
pod "AFNetworking",'~> 3.1.0'
pod "SDWebImage"
pod "UMengUShare/Social/WeChat"
pod 'AliyunPlayer_iOS'
pod 'Toast', '~> 4.0.0'
pod 'UITextView+Placeholder', '~> 1.2'
end
and when I "pod install" or "pod update"
then got this message in terminal
Analyzing dependencies
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
### Command
```
/usr/local/bin/pod install
```
### Report
* What did you do?
* What did you expect to happen?
* What happened instead?
### Stack
```
CocoaPods : 1.3.1
Ruby : ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin17]
RubyGems : 2.6.14
Host : Mac OS X 10.13.4 (17E199)
Xcode : 9.3 (9E145)
Git : git version 2.15.1 (Apple Git-101)
Ruby lib dir : /usr/local/Cellar/ruby/2.4.2_1/lib
Repositories : master - https://github.com/CocoaPods/Specs.git # 90a8f1374ef5378bc8a55c5a4e4a19eb92385907
```
### Plugins
```
cocoapods-deintegrate : 1.0.1
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.3.0
cocoapods-try : 1.1.0
```
### Podfile
```ruby
# Uncomment this line to define a global platform for your project
# platform :ios, '10.0'
# Pods for BandUJam
target 'BandUJam' do
pod 'Masonry'
pod 'SDWebImage'
pod 'VODUpload'
pod "AFNetworking",'~> 3.1.0'
pod "SDWebImage"
pod "UMengUShare/Social/WeChat"
pod 'AliyunPlayer_iOS'
pod 'Toast', '~> 4.0.0'
pod 'UITextView+Placeholder', '~> 1.2'
end
```
### Error
```
RuntimeError - [Xcodeproj] Unknown object version.
/usr/local/lib/ruby/gems/2.4.0/gems/xcodeproj-1.5.3/lib/xcodeproj/project.rb:217:in `initialize_from_file'
/usr/local/lib/ruby/gems/2.4.0/gems/xcodeproj-1.5.3/lib/xcodeproj/project.rb:102:in `open'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/installer/analyzer.rb:903:in `block (2 levels) in inspect_targets_to_integrate'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/installer/analyzer.rb:902:in `each'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/installer/analyzer.rb:902:in `block in inspect_targets_to_integrate'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/installer/analyzer.rb:897:in `inspect_targets_to_integrate'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/installer/analyzer.rb:69:in `analyze'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/installer.rb:242:in `analyze'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/installer.rb:154:in `block in resolve_dependencies'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/installer.rb:153:in `resolve_dependencies'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/installer.rb:116:in `install!'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/command/install.rb:41:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/lib/cocoapods/command.rb:52:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.3.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
```
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=%5BXcodeproj%5D+Unknown+object+version.&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Looking for related issues on cocoapods/cocoapods...
- RuntimeError - [Xcodeproj] Unknown object version.
https://github.com/CocoaPods/CocoaPods/issues/7458 [closed] [12 comments]
a week ago
- RuntimeError - [Xcodeproj] Unknown object version.
https://github.com/CocoaPods/CocoaPods/issues/6992 [closed] [12 comments]
a week ago
- RuntimeError - [Xcodeproj] Unknown object version.
https://github.com/CocoaPods/CocoaPods/issues/6991 [closed] [11 comments]
03 Feb 2018
and 33 more at:
https://github.com/cocoapods/cocoapods/search?q=[Xcodeproj]%20Unknown%20object%20version.&type=Issues&utf8=✓
and I tried this in the terminal
cd ~/.cocoapods/repos
rm -rf master
pod setup
still got this message in terminal
How to fix it? thank you very much!

You need to run this Sudo gem install cocoapods --pre
Please check this reported issue https://github.com/CocoaPods/CocoaPods/issues/7458

Check you xcodeproj gem version by the following:
gem list
If it is under 1.5.6, update it using:
gem update xcodeproj
After update is completed, you can remove the old version using:
gem uninstall xcodeproj
And select the old version.
Hope this will help!

If you are using xCode Version 9.4 and create new project you will find this issue,
to fix this issue change the project formate to xCode8.0- compatible

gem install cocoapods --pre --user
solved the issue for me

use these pods above of (# Pods for BandU)and save your file. Then again install and update your pod. it will work.
These are the correct framework use now:
pod 'Masonry'
pod 'SDWebImage'
pod 'Aliyun VideoCore'
pod 'AliyunOSSiOS'
pod 'VODUpload'
pod 'AFNetworking'
pod 'UMengUShare/Social/WeChat'
pod 'Toast'
pod 'UITextView+Placeholder'
Hope it will help you.

Related

Error running pod install: How to solve this problem?

I've searched a lot but unfortunately I didn't find a solution.
For my flutter project I added the Firebase plug in in the pubspec.yaml file and since then I wasn't able to run the project on my iPhone anymore.
It says: Exception: Error running pod install
What I tried so far:
deleting the podfile and run pod install --repo-update but it didn't work.
Can someone PLEASE help me? Thank you so much!
This is what my terminal shows when I try to run the project:
lib/main.dart:1
Automatically signing iOS for device deployment using specified development team in Xcode project: 7F67C53MP2
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios`
cloud_firestore: Using Firebase SDK version '8.0.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
firebase_core: Using Firebase SDK version '8.0.0' defined in 'firebase_core'
Resolving dependencies of `Podfile`
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
### Command
```
/usr/local/bin/pod install --verbose
```
### Report
* What did you do?
* What did you expect to happen?
* What happened instead?
### Stack
```
CocoaPods : 1.10.1
Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]
RubyGems : 3.0.3
Host : macOS 11.3 (20E232)
Xcode : 12.5 (12E262)
Git : git version 2.30.1 (Apple Git-130)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories :
```
### Plugins
```
cocoapods-deintegrate : 1.0.4
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-trunk : 1.5.0
cocoapods-try : 1.2.0
```
### Podfile
```ruby
# Uncomment this line to define a global platform for your project
# platform :ios, '10.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
```
### Error
```
LoadError - dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.1/lib/ffi_c.bundle, 9): no suitable image found. Did find:
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.1/lib/ffi_c.bundle: mach-o, but wrong architecture
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.1/lib/ffi_c.bundle: mach-o, but wrong architecture - /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.1/lib/ffi_c.bundle
2
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.1/lib/ffi.rb:5:in `rescue in <top (required)>'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.1/lib/ffi.rb:2:in `<top (required)>'
2
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/ethon-0.14.0/lib/ethon.rb:3:in `<top (required)>'
2
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in `<top (required)>'
2
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:74:in `cdn_url?'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:36:in `create_source_with_url'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:21:in `find_or_create_source_with_url'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:178:in `block in sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:177:in `map'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:177:in `sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1073:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1072:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:414:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:238:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:160:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
```
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=dlopen%28%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.1%2Flib%2Fffi_c.bundle%2C+9%29%3A+no+suitable+image+found.++Did+find%3A%0A%09%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.1%2Flib%2Fffi_c.bundle%3A+mach-o%2C+but+wrong+architecture%0A%09%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.1%2Flib%2Fffi_c.bundle%3A+mach-o%2C+but+wrong+architecture+-+%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.1%2Flib%2Fffi_c.bundle&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Looking for related issues on cocoapods/cocoapods...
Error output from CocoaPods:
↳
Searching for inspections failed: undefined method `map' for nil:NilClass
[!] Automatically assigning platform `iOS` with version `12.1` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
Exception: Error running pod install
Exited (sigterm)
On M1 macs, this is a known issue. Here's what you should do.
Run this command (need to be run only first time)
sudo arch -x86_64 gem install ffi
Install your pods like this.
arch -x86_64 pod install
Going forward, you need to run only the second command for pod install.
Source 1 : Got error while trying pod install #10220
Source 2 : pod install /w m1 macbook #10518
If you don't want to have to remember to include arch -x86_64 every time you run pod install, I found an alternative answer in Apple's forums that worked for me:
Uninstall CocoaPods (if installed by gem)
$ [sudo] gem uninstall cocoapods # use sudo if cocoapods was installed using sudo
Install CocoaPods using Homebrew
$ brew install cocoapods
Install pods using the normal command!
$ pod install
Installing pods worked like a charm with the Homebrew version of CocoaPods!
This answer may not be for everyone; CocoaPods' site doesn't officially recommend using Homebrew to install, and not everyone uses Homebrew. But I like Homebrew, and I found this a lot easier than having to change my command for installing pods. Credit to treekie_ for this answer originally, but sharing here in case others find this first.
run this code on the terminal
sudo arch -x86_64 gem install ffi
Next, go to the ios folder in your project, and open Podfile.
if there is a code like below:
#platform :ios, '9.0'
remove the # character and change the 9.0 to 10.0, and the final code should be as this
platform :ios, '10.0'

Ruby: LoadError - library not found for class Digest::SHA1 -- digest/sha1

When running pod install it runs into a problem when installing yoga. Seems to be a problem with my ruby environment?
$ pod install
Analyzing dependencies
Fetching podspec for `Folly` from `../node_modules/react-native/third-party-podspecs/Folly.podspec`
Fetching podspec for `Permission-Camera` from `../node_modules/react-native-permissions/ios/Camera.podspec`
Fetching podspec for `Permission-LocationAlways` from `../node_modules/react-native-permissions/ios/LocationAlways.podspec`
Fetching podspec for `Permission-LocationWhenInUse` from `../node_modules/react-native-permissions/ios/LocationWhenInUse.podspec`
Fetching podspec for `RNPermissions` from `../node_modules/react-native-permissions`
Fetching podspec for `React` from `../node_modules/react-native/`
Fetching podspec for `yoga` from `../node_modules/react-native/ReactCommon/yoga`
Command
/Users/User/.rbenv/versions/2.3.1/bin/pod install
Stack
CocoaPods : 1.5.3
Ruby : ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
RubyGems : 2.5.1
Host : Mac OS X 10.15.1 (19B88)
Xcode : 11.2.1 (11B500)
Git : git version 2.24.0
Ruby lib dir : /Users/User/.rbenv/versions/2.3.1/lib
Repositories : master - https://github.com/CocoaPods/Specs.git # 7f8d90dc76a619c74dfe5b8d17317599f6175fc3
Plugins
cocoapods-deintegrate : 1.0.2
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.3.1
cocoapods-try : 1.1.0
Podfile
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'default' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Your 'node_modules' directory is probably in the root of your project,
# but if not, adjust the `:path` accordingly
pod 'React', :path => '../node_modules/react-native/'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
# Pods for default
pod 'GoogleIDFASupport'
# Pods for ReactPushNotifications - Add these lines
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'Firebase/Storage'
# Pods for react-native-permissions
pod 'RNPermissions', :path => '../node_modules/react-native-permissions'
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Camera', :path => "#{permissions_path}/Camera.podspec"
pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways.podspec"
pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse.podspec"
end
Error
LoadError - library not found for class Digest::SHA1 -- digest/sha1
/Users/User/.rbenv/versions/2.3.1/lib/ruby/2.3.0/digest.rb:16:in `const_missing'
/Users/User/.rvm/gems/ruby-2.4.1/gems/cocoapods-core-1.5.3/lib/cocoapods-core/specification.rb:566:in `checksum'
/Users/User/.rvm/gems/ruby-2.4.1/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:641:in `block in generate_version_locking_dependencies'
/Users/User/.rvm/gems/ruby-2.4.1/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:640:in `reject'
/Users/User/.rvm/gems/ruby-2.4.1/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:640:in `generate_version_locking_dependencies'
/Users/User/.rvm/gems/ruby-2.4.1/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:87:in `analyze'
/Users/User/.rvm/gems/ruby-2.4.1/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:243:in `analyze'
/Users/User/.rvm/gems/ruby-2.4.1/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:154:in `block in resolve_dependencies'
/Users/User/.rvm/gems/ruby-2.4.1/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:64:in `section'
/Users/User/.rvm/gems/ruby-2.4.1/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:153:in `resolve_dependencies'
/Users/User/.rvm/gems/ruby-2.4.1/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:116:in `install!'
/Users/User/.rvm/gems/ruby-2.4.1/gems/cocoapods-1.5.3/lib/cocoapods/command/install.rb:41:in `run'
/Users/User/.rvm/gems/ruby-2.4.1#global/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Users/User/.rvm/gems/ruby-2.4.1/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:52:in `run'
/Users/User/.rvm/gems/ruby-2.4.1/gems/cocoapods-1.5.3/bin/pod:55:in `<top (required)>'
/Users/User/.rbenv/versions/2.3.1/bin/pod:23:in `load'
/Users/User/.rbenv/versions/2.3.1/bin/pod:23:in `<main>'
For me the me problem started after an unsolicited system update.
Uninstalling ruby and installing it again solved the issue:
rbenv uninstall 2.5.1
rbenv install 2.5.1
there is issue with ruby version.
Install latest
brew install ruby
below command will overwrite the previous version
brew link --overwrite ruby
close this terminal and open new terminal.check your version
ruby -v
check issue resolve or not
ruby -r digest/sha1 -e 'p Digest::SHA1'
expected output : Digest::SHA1
Since this worked me, I am posting it as a comment.
After running
rbenv uninstall 2.5.1
if the below command is giving you an error (with ruby not installing)
rbenv install 2.5.1
maybe run this (for mac path)
RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local/Cellar/openssl/1.0.2q rbenv install 2.3.5
I had this issue when working on a Rails 4.2.3 application with Ruby 2.2.3 and RVM in Ubuntu 20.04.
I was getting the error below when I try running the rails server command:
/usr/share/rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/digest.rb:15:in `const_missing': library not found for class Digest::SHA1 -- digest/sha1 (LoadError)
I found out that the issue was caused by this library - libssl-dev
All I had to do was to uninstall the ruby version:
rvm uninstall 2.2.3
Note: Replace rvm with rbenv if you're using rbenv for package management
And then installed the ruby version again:
rvm install 2.2.3
This removed the libssl-dev library and installed libssl1.0-dev library.
Finally, I opened the application and installed all my gems again:
bundle install
Note: This installed the rails gem for the project as well
Finally, I started my rails server again:
rails server
and everything worked fine this time.

Cocoapods error: cannot load such file -- macho

I have an error when I try to install pod. I try to uninstall completely cocoapods and install it again but it doesn't work. I have no idea how to fix it I tried to install macho but it doesn't help.
It looks ok until Generating Pods project then it crashes
pod version 1.5.3
pod install
Analyzing dependencies
Downloading dependencies
Using Adjust (4.8.5)
Using Crashlytics (3.10.7)
Using Fabric (1.7.11)
Using Google-Mobile-Ads-SDK (7.33.1)
Using GoogleAds-IMA-iOS-SDK (3.7.3)
Generating Pods project
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
### Command
```
/Users/s/.rvm/gems/ruby-2.2.4/bin/pod install
```
### Report
* What did you do?
* What did you expect to happen?
* What happened instead?
### Stack
```
CocoaPods : 1.5.3
Ruby : ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-darwin15]
RubyGems : 2.6.10
Host : Mac OS X 10.14 (18A391)
Xcode : 9.4.1 (9F2000)
Git : git version 2.16.2
Ruby lib dir : /Users/s/.rvm/rubies/ruby-2.2.4/lib
Repositories : master - https://github.com/CocoaPods/Specs.git # 799ce6567dfe5da62ecdc3a7ba975737c7926347
```
### Plugins
```
cocoapods-deintegrate : 1.0.2
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.3.1
cocoapods-try : 1.1.0
```
### Podfile
```ruby
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
platform :ios, '9.0'
project 'BunteMobile.xcodeproj'
target 'BunteMobile' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for BunteMobile
pod 'Adjust', '~> 4.8.3'
pod 'Google-Mobile-Ads-SDK'
pod 'GoogleAds-IMA-iOS-SDK', '~> 3.7'
pod 'Fabric', '~> 1.7.0'
pod 'Crashlytics', '~> 3.9'
target 'BunteMobileTests' do
inherit! :search_paths
# Pods for testing
end
end
```
### Error
```
LoadError - cannot load such file -- macho
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:432:in `rescue in dynamic_binary?'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:427:in `dynamic_binary?'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:164:in `block in vendored_dynamic_frameworks'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:163:in `select'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:163:in `vendored_dynamic_frameworks'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:172:in `vendored_static_frameworks'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:238:in `vendored_static_artifacts'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb:56:in `block in generate'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb:56:in `any?'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb:56:in `generate'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb:39:in `save_as'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator/target_installer.rb:112:in `update_changed_file'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb:96:in `block in create_xcconfig_file'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb:93:in `each'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb:93:in `create_xcconfig_file'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb:18:in `block in install!'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:142:in `message'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb:14:in `install!'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:181:in `block (2 levels) in install_libraries'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:179:in `each'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:179:in `block in install_libraries'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:142:in `message'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:167:in `install_libraries'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:65:in `generate!'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:184:in `block in generate_pods_project'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:64:in `section'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:183:in `generate_pods_project'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:119:in `install!'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/command/install.rb:41:in `run'
/Users/s/.rvm/gems/ruby-2.2.4#global/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:52:in `run'
/Users/s/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/bin/pod:55:in `<top (required)>'
/Users/s/.rvm/gems/ruby-2.2.4/bin/pod:22:in `load'
/Users/s/.rvm/gems/ruby-2.2.4/bin/pod:22:in `<main>'
/Users/s/.rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:24:in `eval'
/Users/s/.rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:24:in `<main>'
```
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=cannot+load+such+file+--+macho&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Looking for related issues on cocoapods/cocoapods...
- LoadError - cannot load such file -- macho
https://github.com/CocoaPods/CocoaPods/issues/7849 [closed] [7 comments]
16 hours ago
- LoadError - cannot load such file -- macho
https://github.com/CocoaPods/CocoaPods/issues/7867 [closed] [17 comments]
5 weeks ago
- LoadError - cannot load such file -- macho
https://github.com/CocoaPods/CocoaPods/issues/7864 [closed] [2 comments]
21 Jun 2018
and 5 more at:
https://github.com/cocoapods/cocoapods/search?q=cannot%20load%20such%20file%20--%20macho&type=Issues&utf8=✓

EEXIST - File exists workspace/Pods

This is occurring When I am trying to build the application through Jenkins.
I have wiped out the current workspace in Jenkins and build the application and its throwing the following error
[workspace] $ touch Pods rm -r -f Pods pod repo update
[workspace] $ pod install
[33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
Consider adding the following to ~/.profile:
export LANG=en_US.UTF-8
[0m
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
### Command
```
/usr/bin/pod install
```
### Report
* What did you do?
* What did you expect to happen?
* What happened instead?
### Stack
```
CocoaPods : 0.37.2
Ruby : ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]
RubyGems : 2.5.2
Host : Mac OS X 10.10.3 (14D136)
Xcode : 6.3.2 (6D2105)
Git : git version 2.3.2 (Apple Git-55)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git # efe0250cfcdd610a45cdd5691bd3c6bcb38669be
```
### Plugins
```
cocoapods-plugins : 0.4.2
cocoapods-trunk : 0.6.1
cocoapods-try : 0.4.5
```
### Podfile
```ruby
platform :ios, '7.0'
pod 'AFNetworking', '1.3.2'
pod 'FMDB', '~> 2.3'
```
### Error
```
Errno::EEXIST - File exists - /Users/jenkins/.jenkins/jobs/App-iOS-Trunk/workspace/Pods
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:245:in `mkdir'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:245:in `fu_mkdir'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:219:in `block (2 levels) in mkdir_p'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:217:in `reverse_each'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:217:in `block in mkdir_p'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:203:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:203:in `mkdir_p'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/lib/cocoapods/sandbox.rb:58:in `initialize'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/lib/cocoapods/config.rb:202:in `new'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/lib/cocoapods/config.rb:202:in `sandbox'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/lib/cocoapods/command/project.rb:69:in `run_install_with_update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/lib/cocoapods/command/project.rb:101:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.8.2/lib/claide/command.rb:312:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/lib/cocoapods/command.rb:46:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/bin/pod:44:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'
```
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=File+exists+-+%2FUsers%2Fjenkins%2F.jenkins%2Fjobs%2FeLearner-Native-iOS-Trunk%2Fworkspace%2FPods&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Build step 'Update CocoaPods' marked build as failure
Finished: FAILURE
For other applications for which current workspace is not not wiped are build gets successful. But when I wipe out the current workspace Its displaying the above Error.
Adding export LANG=en_US.UTF-8 in an "Execute shell" script before invoking pod fixed this on my Jenkins box. Also consider using -d to check the directory.
# Cocoapods
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
if [ -d Pods ]; then
rm -rf Pods
fi
pod repo update
pod install
# ...

Pod GoogleMaps not working

I know this is very basic, but not able to debug the problem. This is my Podfile.
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.1'
pod 'GoogleMaps'
I picked this from here. When I try pod install, I get
[!] Unable to find a specification for `GoogleMaps`
verbose says:
Preparing
Updating local specs repositories
Updating spec repo `master`
$ /usr/bin/git pull --ff-only
Already up-to-date.
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods`: (``)
Finding Podfile changes
- GoogleMaps
Resolving dependencies of `Podfile`
[!] Unable to find a specification for `GoogleMaps`
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/resolver.rb:388:in `handle_resolver_error'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/resolver.rb:69:in `rescue in resolve'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/resolver.rb:56:in `resolve'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:535:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/user_interface.rb:59:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:533:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:70:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:210:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:133:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/user_interface.rb:59:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:132:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:104:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command/project.rb:101:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:312:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command.rb:48:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/bin/pod:44:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'
Start fresh:
Create a new, clean Xcode project
pod init
Add the lines below in Podfile
pod install
Podfile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.1'
target 'SO-32079263' do
pod 'GoogleMaps'
end
pod install
tested with 0.37.1
Analyzing dependencies
Downloading dependencies
Installing GoogleMaps (1.10.1)
Generating Pods project
Integrating client project
Less fresh: (See Jatin comment)
Alternate step 2: rm -rf Pods/ Podfile Podfile.lock ; pod init
This worked for me
Install cocoa pods
sudo gem install cocoapods
Create a new, Xcode project (Project Name example: My Project)
Go to the project folder and create a new file with the name Podfile
Open pod file and enter the config below - Change "My Project" to your project name.
>
source 'https://github.com/CocoaPods/Specs.git'
target 'My Project' do
pod 'GoogleMaps'
end
In Terminal, navigate to project folder and type pod install
pod install
Analyzing dependencies
Downloading dependencies
Using GoogleMaps (1.13.2)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
After trying many things Here is the fix!!
Imp: Make sure that you have these lines in your PodFile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
target 'YOUR_APPLICATION_TARGET_NAME_HERE' do
pod 'GoogleMaps'
end
If the above is fine then you need to update the pods:
try the following steps:
Open a new terminal and run the following command in a temp directory.
pod try GoogleMaps
keep patience! It will take some time but will update the pod.
Now try to install the pod in ur project again. It should work.Else try to run the following commands in the project dir:
pod repo update
try again.
Comment in the case of any issue!!

Resources