Error: ENOENT when installing Pow on macOS
I kept getting this error when installing pow on macOS. There are some old threads about it, with fixes for previous verisons of OSX prior to El Capitan, but for the most part it seems to be a solved bug.
philihp@sterling ~$ curl get.pow.cx | sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 9039 100 9039 0 0 8763 0 0:00:01 0:00:01 --:--:-- 8767 *** Installing Pow 0.5.0... *** Installing local configuration files... *** Installing system configuration files as root... Password: hunter2 /Users/philihp/Library/Application Support/Pow/Versions/0.5.0/lib/command.js:20 throw err; ^ Error: ENOENT, open '/tmp/pow.98645.1466285627293.3185'
If you're getting this error too, perhaps the solution will be similar to mine?
It turned out that I had at some point changed the default shell of my root user to /usr/local/bin/fish
, then uninstalled fish, and never bothered to set it back. I guess this isn't really a problem most of the time because not much should (hopefully) ever run as root, but it finally surfaced here when trying to install Pow.
My solution was the following:
- Enable the root user with
dsenableroot
- If you try to
sudo su
, you will get something likesu: /usr/local/bin/fish: No such file or directory
- Change root's shell with
sudo chsh -s /bin/sh
- Disable the root user with
dsenableroot -d
Once I did this, installing worked as normal.
philihp@sterling ~$ curl get.pow.cx | sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 9039 100 9039 0 0 17142 0 --:--:-- --:--:-- --:--:-- 17151 *** Installing Pow 0.5.0... *** Installing local configuration files... *** Starting the Pow server... *** Performing self-test... *** Installed For troubleshooting instructions, please see the Pow wiki: https://github.com/basecamp/pow/wiki/Troubleshooting To uninstall Pow, `curl get.pow.cx/uninstall.sh | sh`