Thursday, 10 May 2018

macos - Mac OSX Mavericks - ZSH can't 'source ~/.zshrc', too many open files

I can't source any changes to my .zshrc (or my .bash_profile for that matter), because I get this error when I try:


/Users/ME/.zshrc:source:100: too many open files: /Users/ME/.zshrc

I've tried ulimit -n 10000, but it doesn't work. I've also tried adding a launchd.conf file (there wasn't one there, I had to create it) to permanently change the hard & soft file limit, but on reboot, my terminal instantly crashes with a Process Completed message. (deleting the launchd.conf file & rebooting fixes this issue).


This could be related: for some reason, my $PATH variable is extremely long, as in thousands of characters. There are many repeating parts, for example, here is part of what I get if I do an echo $PATH :


/Applications/MAMP/bin/php/php5.4.10/bin:/Applications/MAMP/bin/php/php5.4.10/bin:/Applications/MAMP/bin/php/php5.4.10/bin:/Applications/MAMP/bin/php/php5.4.10/bin:/Applications/MAMP/bin/php/php5.4.10/bin........

That continues hundreds of times.


This made me think something in MAMP is rewriting my $PATH variable over and over which is causing all my other problems, but I can't find where its happening, and I don't know how to fix it.


Has anyone run into this before??

No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...