Cannot start NodeJS (Appium) application on OSX El Capitan after OS update

So, I have this .Net code that launches Appium, which is a NodeJS application running on Mac OS. He worked on Yosemite, but stopped working after the Xcode and El Capitan updates. I am trying to run the following command as part of the code:

ssh.RunCommand("/usr/local/bin/forever start /Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js --address 0.0.0.0 --port 4723 --log-level debug --device-name \"iPhone 6\" --platform-name iOS --platform-version \"8.4\" --app \"/Applications/my.app\" --browser-name iOS -l --log /Library/Logs/Appium/current.log"); 

And I get "env: node: no such file or directory" in Visual Studio

 System Policy: deny file-write-data /usr/bin/env 

In system.log, I think OS X no longer allows me to access / usr / bin / env, is there a way around it? Hooray!

+5
source share
2 answers

This is indeed caused by System Integrity Protection (SIP) in El Capitan, but another answer is erroneous in the fact that they stated that /usr/local is still able to write or that you can restore permanent access to it.

This completely confuses my homebrew installation every time I install a new program, and I have to chown -R username /usr/local at least once a week. SIP has several different command line options that you might need to completely or completely disable it (which I definitely consider) or just disable its parts.

Note that disabling / enabling / changing the system integrity protection should be performed in single-user mode, rebooting into recovery mode, holding Cmd+R pressed and then starting the root terminal and executing the csrutil command, which takes several parameters, namely disable and enable , but also options that only partially disable SIP for specific things (which are not specified at all in the csrutil --help dialog box). You will also need a reboot for the settings to take effect.

0
source

El Capitan added something called System Integrity Protection or "SIP". "SIP" prevents you from writing to /usr , even if you are root. However, /usr/local is still available and what your application is trying to do. But there is no chance of /usr/local or you do not have the appropriate permissions.

If /usr/local already exists, run:

sudo chown -R $(whoami):admin /usr/local

else, follow these steps: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/El_Capitan_and_Homebrew.md

-1
source

Source: https://habr.com/ru/post/1236242/


All Articles