Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RabbitMQ command doesn't exist?

Tags:

macos

rabbitmq

OS: Mac OSX 10.9

I have rabbitmq installed via home brew and when I go to /usr/local/sbin and run rabbitmq-server it states that: rabbitmq-server: command not found even as sudo it states the same error.

How do I get rabbitmq to start if it's not a command? I have also tried chmod +x rabbitmq-server in that directory to get it be an executable, same issue.

like image 742
user3379926 Avatar asked Apr 14 '14 00:04

user3379926


People also ask

How do I know if RabbitMQ is installed?

For windows, open PowerShell, and enter the following:bat status … {rabbit,"RabbitMQ","3.8.

How do I install RabbitMQ?

Download the RabbitMQ Latest binary from its official downloads page We've downloaded 3.9. 13 as rabbitmq-server-3.9. 13.exe for windows. Now install the RabbitMQ using the installer by double clicking on it and follow the default selections and finish the setup.


1 Answers

From the docs:

The RabbitMQ server scripts are installed into /usr/local/sbin. This is not automatically added to your path, so you may wish to add PATH=$PATH:/usr/local/sbin to your .bash_profile or .profile. The server can then be started with rabbitmq-server.

All scripts run under your own user account. Sudo is not required.

You should be able to run /usr/local/sbin/rabbitmq-server or add it to your path to run it anywhere.


Your command failed because, by default, . is not on your $PATH. You went to the right directory (/usr/local/sbin) and wanted to run the rabbitmq-server that existed and had exec permissions, but by typing rabbitmq-server as a command Unix only searches for that command on your $PATH directories - which didn't include /usr/local/sbin.

What you wanted to do can be achieved by typing ./rabbitmq-server - say, execute the rabbitmq-server program that is in the current directory. That's analogous to running /usr/local/sbin/rabbitmq-server from everywhere - . represents your current directory, so it's the same as /usr/local/sbin in that context.

like image 180
Nick Rempel Avatar answered Sep 21 '22 13:09

Nick Rempel