On OSX Yosemite and the latest version of meteor (1.0.1), no matter how many times I uninstall and reinstall it, I can't seem to get it running without sudo. My user account is an administrator account. But meteor refuses to run without sudo. The errors I'm getting are all:
-bash: meteor: command not found
I've seen a few posts on here with similar problems. I've tried repairing disk permissions with disk utility. I've tried:
sudo chown -R $myUsername /usr/local/bin/meteor
I'm not sure what else I can do, because it seems to be a permissions issue. Does anyone have any suggestions?
Additional info that might help:
$ sudo which meteor
/usr/local/bin/meteor
$ sudo ls -l /usr/local/bin/meteor
-rwxrwxrwx 1 root wheel 3528 Dec 18 23:14 /usr/local/bin/meteor
$ ls -ld /usr/local/bin
drwx------ 6 502 wheel 204 Dec 18 23:14 /usr/local/bin
By the way, ls -l /usr/local/bin/meteor
only works with sudo
.
After we clarified the permissions of the meteor
executable and its base directory,
the problem became quite clear:
/usr/local/bin/meteor
/usr/local/bin
The steps to resolve:
sudo chmod +rx /usr/local/bin
PATH
: PATH=$PATH:/usr/local/bin
For future reference:
-bash: XYZ: command not found
XYZ
, for example /path/to/XYZ
/path/to/XYZ
/path/to/XYZ
gives -bash: /path/to/XYZ: Permission denied
that means you have a problem with permissions on the file and/or directories:
sudo chmod +rx /path/to/XYZ
sudo chmod +x /path /path/to
/path/to/XYZ
should workXYZ
(without full path) still doesn't work, that means /path/to
is not on your PATH
. Fix with PATH=$PATH:/path/to
Note: the above sudo chmod
commands give permissions (read and exec) to all users: owner + group + other. In the case of the OP (and in most common cases), this is perfectly fine.
In situations with more sophisticated permission setup, you might need to be more specific, and use g+rx
instead of +rx
.
(for the record)
If it works with sudo
, and without sudo
you get command not found
, that means that meteor
is on the PATH
for root
but not for your user. To make it work for your user, you need to find the path to meteor
and add it to your user's PATH
. For example:
sudo su -
meteor
, run command: which meteor
PATH
, for example if earlier which meteor
gave you /usr/local/bin/meteor
, then do this: PATH=$PATH:/usr/local/bin
After this, it should work with your user. To make it "permanent", add the last step in your ~/.bashrc
.
If this still doesn't work, then perhaps your user doesn't have the execute permission on the file. Fix that with this command:
sudo chmod +x /usr/local/bin/meteor
From your comments it also seems your user doesn't have permission on the /usr/local/bin
directory itself. Fix that with this command:
sudo chmod +rx /usr/local/bin
Shouldn't need an admin account to run it, standard user account works fine. You can locate the meteor file by typing which meteor
. It will tell you what file is being used to execute.
Try removing the .meteor
folder in your home directory, something like rm -rf ~/.meteor
and the script from the bin folder rm /usr/local/bin/meteor
or rm 'which meteor'
(speech marks there are the ones above ~)
And then reinstall meteor without sudo using the curl https://install.meteor.com/ | sh
command.
Should hopefully install with all the correct permissions...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With