前提・実現したいこと
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の古いバージョンでやっても効果なしでした。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/06/30 11:03 編集