Cocoa pods installation

trying to install cocoapods but getting error ?

when i try pod init comaand

i am getting this error

/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:92:in `require’: cannot load such file – concurrent/atomic/event (LoadError)

when i am trying sudo gem install cocopods

ERROR: While executing gem … (Gem::FilePermissionError) You don’t have write permissions for the /usr/bin directory.

how can i resolve this issue ?

You must have administrator rights for the current user when when using sudo.

Go to System Preferences and select Users & Groups and check that you, as the current user, have Admin rights.