I had a problem when installing the kingfisher library I attached all the screenshots of all errors and pod file please see it and guided me how I can used the kingfisher library.
Googling the JSONParser 767 error led me to this page: https://github.com/CocoaPods/CocoaPods/issues/9694
It suggests to run the following in the terminal:
rm -rf ~/.cocoapods/repos/trunk/
pod install
Comments suggest that this reliably solves the issue.