質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%

Q&A

解決済

1回答

4510閲覧

cocoapodsのインストールができない

saku0914

総合スコア1

0グッド

0クリップ

投稿2021/01/09 13:42

% sudo gem install cocoapods
Password:
Ignoring bigdecimal-2.0.0 because its extensions are not built. Try: gem pristine bigdecimal --version 2.0.0
Ignoring date-3.0.1 because its extensions are not built. Try: gem pristine date --version 3.0.1
Ignoring dbm-1.1.0 because its extensions are not built. Try: gem pristine dbm --version 1.1.0
Ignoring etc-1.1.0 because its extensions are not built. Try: gem pristine etc --version 1.1.0
Ignoring ffi-1.13.1 because its extensions are not built. Try: gem pristine ffi --version 1.13.1
Ignoring io-console-0.5.6 because its extensions are not built. Try: gem pristine io-console --version 0.5.6
Ignoring libxml-ruby-3.2.0 because its extensions are not built. Try: gem pristine libxml-ruby --version 3.2.0
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.

current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/ext/ffi_c

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /Library/Ruby/Site/2.6.0 -r ./siteconf20210109-95926-1xgckvu.rb extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi,/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/ffi... yes
checking for ffi_prep_closure_loc() in -lffi... yes
checking for ffi_prep_cif_var()... yes
checking for ffi_raw_call()... yes
checking for ffi_prep_raw_closure()... yes
creating extconf.h
creating Makefile

current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/ext/ffi_c
make DESTDIR= clean

current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/ext/ffi_c
make DESTDIR=
compiling ArrayType.c
compiling ClosurePool.c
compiling LastError.c
compiling LongDouble.c
compiling MappedType.c
compiling MemoryPointer.c
MemoryPointer.c:41:10: fatal error: 'AbstractMemory.h' file not found
#include "AbstractMemory.h"
^~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [MemoryPointer.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/ffi-1.13.1/gem_make.out

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

hoshi-takanori

2021/01/09 15:10

個人的には、sudo を使って cocoapods を入れるのはお勧めしません。 homebrew で入れるのがいいと思います。
guest

回答1

0

ベストアンサー

rbenvで自分のホームディレクトリにrubyをインストールしています。

$ rbenv versions system 2.5.8 2.6.6 2.7.2 * 3.0.0 (set by /Users/ユーザ名/.rbenv/version)

cocoapodsをインストールしてみました。

$ gem install cocoapods Fetching nanaimo-0.3.0.gem Fetching colored2-3.1.2.gem Fetching claide-1.0.3.gem Fetching CFPropertyList-3.0.3.gem Fetching atomos-0.1.3.gem Fetching xcodeproj-1.19.0.gem Fetching ruby-macho-1.4.0.gem Fetching nap-1.1.0.gem Fetching molinillo-0.6.6.gem Fetching gh_inspector-1.1.3.gem Fetching fourflusher-2.3.1.gem Fetching escape-0.0.4.gem Fetching cocoapods-try-1.2.0.gem Fetching netrc-0.11.0.gem Fetching cocoapods-trunk-1.5.0.gem Fetching cocoapods-search-1.0.0.gem Fetching cocoapods-plugins-1.0.0.gem Fetching cocoapods-downloader-1.4.0.gem Fetching cocoapods-deintegrate-1.0.4.gem Fetching ffi-1.14.2.gem Fetching ethon-0.12.0.gem Fetching typhoeus-1.4.0.gem Fetching public_suffix-4.0.6.gem Fetching fuzzy_match-2.0.4.gem Fetching concurrent-ruby-1.1.7.gem Fetching httpclient-2.8.3.gem Fetching algoliasearch-1.27.5.gem Fetching addressable-2.7.0.gem Fetching thread_safe-0.3.6.gem Fetching tzinfo-1.2.9.gem Fetching i18n-1.8.7.gem Fetching activesupport-5.2.4.4.gem Fetching cocoapods-1.10.1.gem Fetching cocoapods-core-1.10.1.gem Successfully installed nanaimo-0.3.0 Successfully installed colored2-3.1.2 Successfully installed claide-1.0.3 Successfully installed CFPropertyList-3.0.3 Successfully installed atomos-0.1.3 Successfully installed xcodeproj-1.19.0 Successfully installed ruby-macho-1.4.0 Successfully installed nap-1.1.0 Successfully installed molinillo-0.6.6 Successfully installed gh_inspector-1.1.3 Successfully installed fourflusher-2.3.1 Successfully installed escape-0.0.4 Successfully installed cocoapods-try-1.2.0 Successfully installed netrc-0.11.0 Successfully installed cocoapods-trunk-1.5.0 Successfully installed cocoapods-search-1.0.0 Successfully installed cocoapods-plugins-1.0.0 Successfully installed cocoapods-downloader-1.4.0 Successfully installed cocoapods-deintegrate-1.0.4 Building native extensions. This could take a while... Successfully installed ffi-1.14.2 Successfully installed ethon-0.12.0 Successfully installed typhoeus-1.4.0 Successfully installed public_suffix-4.0.6 Successfully installed fuzzy_match-2.0.4 Successfully installed concurrent-ruby-1.1.7 Successfully installed httpclient-2.8.3 A new major version is available for Algolia! Please now use the https://rubygems.org/gems/algolia gem to get the latest features. Successfully installed algoliasearch-1.27.5 Successfully installed addressable-2.7.0 Successfully installed thread_safe-0.3.6 Successfully installed tzinfo-1.2.9 HEADS UP! i18n 1.1 changed fallbacks to exclude default locale. But that may break your application. If you are upgrading your Rails application from an older version of Rails: Please check your Rails app for 'config.i18n.fallbacks = true'. If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be 'config.i18n.fallbacks = [I18n.default_locale]'. If not, fallbacks will be broken in your app by I18n 1.1.x. If you are starting a NEW Rails application, you can ignore this notice. For more info see: https://github.com/svenfuchs/i18n/releases/tag/v1.1.0 Successfully installed i18n-1.8.7 Successfully installed activesupport-5.2.4.4 Successfully installed cocoapods-core-1.10.1 Successfully installed cocoapods-1.10.1 34 gems installed

特に問題ありませんでした。
参考にしてください。

投稿2021/01/09 15:30

technocore

総合スコア7200

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

saku0914

2021/01/10 01:31

ご回答ありがとうございます!できました!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問