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

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

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

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Swift

Swiftは、アップルのiOSおよびOS Xのためのプログラミング言語で、Objective-CやObjective-C++と共存することが意図されています

Q&A

1回答

1996閲覧

【cocoapods】pod installができない...

tk2018

総合スコア6

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Swift

Swiftは、アップルのiOSおよびOS Xのためのプログラミング言語で、Objective-CやObjective-C++と共存することが意図されています

0グッド

0クリップ

投稿2018/06/28 20:39

前提・実現したいこと

OCRをやってみたいと思い、
https://developers.freee.co.jp/entry/2017/12/10/001258を参考に、https://github.com/GoogleCloudPlatform/cloud-vision.gitにある
iOSのサンプルコードを実行しようとした際、
cocoapodsのエラーにハマってしまいました。

発生している問題・エラーメッセージ

Analyzing dependencies
Downloading dependencies
Installing SwiftyJSON (3.1.4)
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

Command

/Users/macuser/.rbenv/versions/2.2.0/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.0p0 (2014-12-25 revision 49005) [x86_64-darwin17] RubyGems : 2.4.5 Host : Mac OS X 10.13.5 (17F77) Xcode : () Git : git version 2.16.3 Ruby lib dir : /Users/macuser/.rbenv/versions/2.2.0/lib Repositories : master - https://github.com/CocoaPods/Specs.git @ 8fddc87320bad7e69116d46d510abf2cde96b207

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.0 cocoapods-try : 1.1.0

Podfile

ruby

1# Copyright 2016 Google Inc. All Rights Reserved. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15platform :ios, '8.0' 16use_frameworks! 17 18target 'imagepicker' do 19 pod 'SwiftyJSON', '~> 3.1' 20end

Error

Errno::EACCES - Permission denied @ dir_s_mkdir - /Users/macuser/Library/Caches/CocoaPods /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/2.2.0/fileutils.rb:252:in `mkdir' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/2.2.0/fileutils.rb:252:in `fu_mkdir' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/2.2.0/fileutils.rb:226:in `block (2 levels) in mkdir_p' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/2.2.0/fileutils.rb:224:in `reverse_each' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/2.2.0/fileutils.rb:224:in `block in mkdir_p' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/2.2.0/fileutils.rb:210:in `each' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/2.2.0/fileutils.rb:210:in `mkdir_p' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/2.2.0/pathname.rb:564:in `mkpath' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/config.rb:90:in `cache_root' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/downloader.rb:33:in `download' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/pod_source_installer.rb:121:in `download_source' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/pod_source_installer.rb:60:in `install!' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:374:in `install_source_of_pod' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:339:in `block (2 levels) in install_pod_sources' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:85:in `titled_section' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:338:in `block in install_pod_sources' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:321:in `each' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:321:in `install_pod_sources' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:164:in `block in download_dependencies' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:64:in `section' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:162:in `download_dependencies' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:117:in `install!' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/command/install.rb:41:in `run' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:52:in `run' /Users/macuser/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-1.5.3/bin/pod:55:in `<top (required)>' /Users/macuser/.rbenv/versions/2.2.0/bin/pod:23:in `load' /Users/macuser/.rbenv/versions/2.2.0/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=Permission+denied+%40+dir_s_mkdir+-+%2FUsers%2Fmacuser%2FLibrary%2FCaches%2FCocoaPods&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...
Found no similar issues. To create a new issue, please visit:
https://github.com/cocoapods/cocoapods/issues/new

試したこと

https://github.com/CocoaPods/CocoaPods/issues/5233
を参照し、podfileにsource source 'https://github.com/CocoaPods/Specs.git'を貼ったりしたのですが、だめでした。

補足情報(FW/ツールのバージョンなど)

rubyやcocoapodsの古いバージョンでやっても効果なしでした。

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

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

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

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

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

guest

回答1

0

これを試してみてはどうでしょうか?

$ xcode-select --install $ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

参考:https://github.com/nodejs/node-gyp/issues/569

投稿2018/06/29 07:07

編集2018/06/29 07:08
hiro_n

総合スコア70

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

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

tk2018

2018/06/30 11:03 編集

$ xcode-select --install xcode-select: error: command line tools are already installed, use "Software Update" to install updates $ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer Password: xcodeも再インストールしたのですが、結果は変わらずです。 作業するディレクトリが違うなど、何か勘違いしているのでしょうか。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問