After updating to Mac OS Catalina some months ago, I followed the prompted suggestions and changed my shell from BASH to ZSH.

Since that time, whenever I use sudo in Terminal, I get sudo: setrlimit(8): Invalid argument. The sudo'd command runs fine, but this error shows every time.

I don't have any plugins or modifications to my shell - it's vanilla ZSH in default Terminal.app

I've searched the Googs but I can't really find anything that seems like a good match - only generic "increasing limits on sockets in osx". I could try that, but I don't understand why I should be having an issue in the first place when I have not and do not doing anything peculiar or fancy with shell - I use it for git, npm and occasionally other commands.

Does anyone have any ideas? Not sure what other information you'd need, but let me know if there is.

1 Answer 1


I had this message as well.

I think I've might have worked out a solution to it.

Check which version of sudo you have installed with sudo -V and if it isn't 1.8.31 download the newest version from here GitHub You'll have to download this one here "sudo-1.8.31.mac1015.pkg"

Let me know if it worked out for you!

  • Thank you. This worked. Wouldn't have thought to manually update sudo. 👍 Commented Mar 11, 2020 at 14:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .