About the problem that CocoaPods cannot be used after updating the system

There was a problem with the computer recently, and I took it for repair. When I came back, I found that the cocoapods could not be used, which was embarrassing.


Entering sudo gem update --system  in the terminal 
shows the following error 
ERROR: While executing gem … (Gem::FilePermissionError) 
You don't have write permissions for the /usr/bin directory.

See the solution online:

Re-enter the following 
sudo gem install -n /usr/local/bin sass 
sudo gem install -n /usr/local/bin cocoapods

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324768349&siteId=291194637