2017-10-19 107 views
1

我試圖安裝莢使用吊艙安裝結果'家「:找不到HOME環境 - 擴大`〜」(引發ArgumentError)

pod install 

這導致下面的錯誤我的iOS項目

/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/config.rb:23:in `home': couldn't find HOME environment -- expanding `~' (ArgumentError) 

     from /usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/config.rb:23:in `<class:Config>' 
     from /usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/config.rb:6:in `<module:Pod>' 
     from /usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/config.rb:3:in `<top (required)>' 
     from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
     from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
     from /usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods.rb:23:in `<module:Pod>' 
     from /usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods.rb:17:in `<top (required)>' 
     from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
     from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
     from /usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/bin/pod:36:in `<top (required)>' 
     from /usr/local/Cellar/cocoapods/1.3.1/libexec/bin/pod:23:in `load' 
     from /usr/local/Cellar/cocoapods/1.3.1/libexec/bin/pod:23:in `<main>' 

這個錯誤是什麼意思,我該如何解決它?任何建議感謝!

回答

0
  1. 鍵入命令env檢查HOME路徑是否存在。
  2. 如果不是,移動到〜/ .bash_profile,並添加: HOME = 「用戶/#(your_user_name)」 出口HOME
  3. 鍵入命令source .bash-profile寫回。

這就是我所知道的,希望它能起作用。