Cocoapods: Can't run Pod Install on windows

Created on 29 Aug 2018  Â·  7Comments  Â·  Source: CocoaPods/CocoaPods

I am trying to use CocoaPods on Windows to develop a React Native app. At first I was unable to run any commands at all, so I disabled the "cannot run cocoapods as root" function.

Trying to run any Pod commands now returns the following error:

C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/cocoapods-1.5.3/lib/cocoapods/executable.rb:111:in `block in which!': [!] Unable to locate the executable `git` (Pod::Informative)
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/cocoapods-1.5.3/lib/cocoapods/executable.rb:110:in `tap'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/cocoapods-1.5.3/lib/cocoapods/executable.rb:110:in `which!'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/cocoapods-1.5.3/lib/cocoapods/executable.rb:133:in `capture_command'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:116:in `git_version'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:130:in `verify_minimum_git_version!'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:49:in `run'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/cocoapods-1.5.3/bin/pod:55:in `<top (required)>'
        from C:/Ruby24-x64/bin/pod:23:in `load'
        from C:/Ruby24-x64/bin/pod:23:in `<main>'

Most helpful comment

PS C:myappios> pod install
Traceback (most recent call last):
31: from C:/Ruby27-x64/bin/pod:23:in <main>' 30: from C:/Ruby27-x64/bin/pod:23:inload'
29: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/bin/pod:36:in <top (required)>' 28: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:inrequire'
27: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in require' 26: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods.rb:17:in 25: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods.rb:75:in <module:Pod>' 24: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:inrequire'
23: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in require' 22: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/core_overrides.rb:1:in 21: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in require' 20: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:inrequire'
19: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/sources_manager.rb:5:in <top (required)>' 18: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:inrequire'
17: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in require' 16: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/typhoeus-1.3.1/lib/typhoeus.rb:2:in 15: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in require' 14: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:inrequire'
13: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ethon-0.12.0/lib/ethon.rb:15:in <top (required)>' 12: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:inrequire'
11: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in require' 10: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ethon-0.12.0/lib/ethon/curl.rb:8:in 9: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ethon-0.12.0/lib/ethon/curl.rb:13:in <module:Ethon>' 8: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ethon-0.12.0/lib/ethon/curl.rb:27:in'
6: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in require' 5: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ethon-0.12.0/lib/ethon/curls/settings.rb:1:in 4: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ethon-0.12.0/lib/ethon/curls/settings.rb:2:in <module:Ethon>' 3: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ethon-0.12.0/lib/ethon/curls/settings.rb:7:in'
2: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ffi-1.12.2-x64-mingw32/lib/ffi/library.rb:99:in ffi_lib' 1: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ffi-1.12.2-x64-mingw32/lib/ffi/library.rb:99:inmap'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ffi-1.12.2-x64-mingw32/lib/ffi/library.rb:145:in `block in ffi_lib': Could not open library 'libcurl': �Ҳ���ָ����ģ�顣r (LoadError)

.
Could not open library 'libcurl.dll': �Ҳ���ָ����ģ�顣r
.
Could not open library 'libcurl.so.4': �Ҳ���ָ����ģ�顣r
.
Could not open library 'libcurl.so.4.dll': �Ҳ���ָ����ģ�顣r

All 7 comments

you need to install git as the error message clearly says.

Thank you for your help. Git has always been installed, my issue is not fixed.

$ git --version
git version 2.8.1.windows.1

I am still having the issue:

cantfindbash

Git and curl are both on the PATH.
Any ideas?

EDIT:
The folder in git that contained bash.exe was _not_ on PATH. I then got a new error:

Errno::E2BIG - Arg list too long - C:/Program Files/Git/usr/bin/bash.exe
C:/Ruby26-x64/lib/ruby/2.6.0/open3.rb:213:in `spawn'
C:/Ruby26-x64/lib/ruby/2.6.0/open3.rb:213:in `popen_run'
C:/Ruby26-x64/lib/ruby/2.6.0/open3.rb:101:in `popen3'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/executable.rb:175:in `popen3'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/executable.rb:67:in `execute_command'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/executable.rb:27:in `block in executable'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/pod_source_preparer.rb:66:in `block (2 levels) in run_prepare_command'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/pod_source_preparer.rb:60:in `chdir'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/pod_source_preparer.rb:60:in `block in run_prepare_command'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface.rb:64:in `section'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/pod_source_preparer.rb:59:in `run_prepare_command'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/pod_source_preparer.rb:37:in `prepare!'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/downloader/cache.rb:202:in `copy_and_clean'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/downloader/cache.rb:159:in `block (2 levels) in uncached_pod'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/downloader/cache.rb:157:in `each'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/downloader/cache.rb:157:in `block in uncached_pod'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/downloader/cache.rb:181:in `in_tmpdir'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/downloader/cache.rb:153:in `uncached_pod'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/downloader/cache.rb:33:in `download_pod'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/downloader.rb:42:in `download'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/pod_source_installer.rb:117:in `download_source'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/pod_source_installer.rb:69:in `install!'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:557:in `install_source_of_pod'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:508:in `block (2 levels) in install_pod_sources'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface.rb:86:in `titled_section'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:507:in `block in install_pod_sources'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:490:in `each'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:490:in `install_pod_sources'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:248:in `block in download_dependencies'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface.rb:64:in `section'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:247:in `download_dependencies'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:157:in `install!'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command/install.rb:52:in `run'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:52:in `run'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/bin/pod:55:in `<top (required)>'
C:/Ruby26-x64/bin/pod:23:in `load'
C:/Ruby26-x64/bin/pod:23:in `<main>'

``

the problem is in the PATH of the machine

[command]"C:Program FilesGitbin" - is missing

pod install ...

(LoadError)libcurl': Impossibile trovare il modulo specificato.
.
Could not open library 'libcurl.dll': Impossibile trovare il modulo specificato.
.
Could not open library 'libcurl.so.4': Impossibile trovare il modulo specificato.
.
Could not open library 'libcurl.so.4.dll': Impossibile trovare il modulo specificato.

same problem path is ok !!! help

PS C:myappios> pod install
Traceback (most recent call last):
31: from C:/Ruby27-x64/bin/pod:23:in <main>' 30: from C:/Ruby27-x64/bin/pod:23:inload'
29: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/bin/pod:36:in <top (required)>' 28: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:inrequire'
27: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in require' 26: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods.rb:17:in 25: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods.rb:75:in <module:Pod>' 24: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:inrequire'
23: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in require' 22: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/core_overrides.rb:1:in 21: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in require' 20: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:inrequire'
19: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/sources_manager.rb:5:in <top (required)>' 18: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:inrequire'
17: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in require' 16: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/typhoeus-1.3.1/lib/typhoeus.rb:2:in 15: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in require' 14: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:inrequire'
13: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ethon-0.12.0/lib/ethon.rb:15:in <top (required)>' 12: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:inrequire'
11: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in require' 10: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ethon-0.12.0/lib/ethon/curl.rb:8:in 9: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ethon-0.12.0/lib/ethon/curl.rb:13:in <module:Ethon>' 8: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ethon-0.12.0/lib/ethon/curl.rb:27:in'
6: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in require' 5: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ethon-0.12.0/lib/ethon/curls/settings.rb:1:in 4: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ethon-0.12.0/lib/ethon/curls/settings.rb:2:in <module:Ethon>' 3: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ethon-0.12.0/lib/ethon/curls/settings.rb:7:in'
2: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ffi-1.12.2-x64-mingw32/lib/ffi/library.rb:99:in ffi_lib' 1: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ffi-1.12.2-x64-mingw32/lib/ffi/library.rb:99:inmap'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ffi-1.12.2-x64-mingw32/lib/ffi/library.rb:145:in `block in ffi_lib': Could not open library 'libcurl': �Ҳ���ָ����ģ�顣r (LoadError)

.
Could not open library 'libcurl.dll': �Ҳ���ָ����ģ�顣r
.
Could not open library 'libcurl.so.4': �Ҳ���ָ����ģ�顣r
.
Could not open library 'libcurl.so.4.dll': �Ҳ���ָ����ģ�顣r

Hello, same problem here !

Follow : https://stackoverflow.com/a/54520887

And then probably you will have an error "'verify_xcode_license_approved!': invalid byte sequence in UTF-8 (ArgumentError)".
Solution here : https://stackoverflow.com/a/60546847

Was this page helpful?
0 / 5 - 0 ratings

Related issues

luhui picture luhui  Â·  3Comments

steffendsommer picture steffendsommer  Â·  3Comments

evermeer picture evermeer  Â·  3Comments

dawnnnnn picture dawnnnnn  Â·  3Comments

pronebird picture pronebird  Â·  3Comments