Cocoapods error: 'Unable to read the license file'

前端 未结 10 1653
挽巷
挽巷 2021-01-11 14:20

When I type

pods install

or

pods update

I get the following error for one library:

Unable

相关标签:
10条回答
  • 2021-01-11 15:06

    This is what worked for me:

    1. remove the offending pod from Podfile
    2. pod install
    3. pod cache clean --all
    4. add pod back into Podfile
    5. pod install

    Note: Be sure to pin the version from Podfile.lock in the Podfile if the locked version is required

    0 讨论(0)
  • 2021-01-11 15:10

    In my case, I solved this issue by changing the name of my license file from LICENSE to LICENSE.txt, updating the file name in the podspec, and including both the framework and the LICENSE.txt file in the zip file for my repository.

    0 讨论(0)
  • 2021-01-11 15:11

    TL;DR It's Ruby 2.2.+ in OS X. Go back to Ruby 2.1.6.

    This was my problem.

    [!] Unable to read the license file '.../LICENSE_.txt' for the spec 'pod (v.v.v)'

    But also had the problem in Rails.

    I had the same problem last week. And Rails had the same problem with load paths with Capital letters in the file path.

    This is the question and their response. Strange error in rails - missing helper

    This is the issue on Github https://github.com/rails/rails/issues/18660

    So, i thought there is the same problem. I go back and the cocoa pod CLI copied all the Licenses in acknowledges.

    In fact, we should post an issue on cocoa pods github.

    0 讨论(0)
  • 2021-01-11 15:14

    My problem was that when I initially added the tag to git, the LICENSE file was not there. I fixed this by:

    1. Remove the tag from the git repo
    2. Make sure the LICENSE file has been committed to the git repo
    3. Add the tag to the git repo again
    4. run pod cache clean --all
    5. run pod spec lint again

    It should now work.

    0 讨论(0)
提交回复
热议问题