I have installed using tar a program called rabbitmq , and when I try to start it according to documentation, I get the following error:
/usr/local/sbin/rabbitmq_server-3.6.14/sbin# ./rabbitmq-server
./rabbitmq-server[22]: .[49]: local: not found [No such file or directory]
root@solaris11test:/usr/local/sbin/rabbitmq_server-3.6.14/sbin#
I did add the path as
export PATH=/usr/local/sbin:$PATH
, But I still get the error.
Can you tell if I am missing something
Show us the first 50 lines of rabbitmq-server and tell us what operating system and shell you're using.
One would guess that either rabbitmq-server line 49 contains the command:
. local ...
and local is not a file in your current working directory when you get to line 49 in that script or that rabbitmq-server line 49 is trying to declare a variable in a function to be a local variable and the shell you're using when you run that script doesn't recognize the local keyword.
I did found a solution for that particular error which was I had to replace #!/bin/sh with
#!/usr/xpg4/bin/sh
. But now I am having another error, refering to line 81 of the script:~
./rabbitmq-server
./rabbitmq-server: line 81: erl: command not found
and viewing the line 81 with vi :
79 # NOTIFY_SOCKET is needed here to prevent epmd from impersonating the
80 # success of our startup sequence to systemd.
81 NOTIFY_SOCKET= \
82 RABBITMQ_CONFIG_FILE=$RABBITMQ_CONFIG_FILE \
83 RABBITMQ_DIST_PORT=$RABBITMQ_DIST_PORT \
Now I am also stuck
But erlang is installed as per the following line:
18
19 set -e
20
21 # Get default settings with user overrides for (RABBITMQ_)<var_name>
22 # Non-empty defaults should be set in rabbitmq-env
23 . `dirname $0`/rabbitmq-env
24
25 RABBITMQ_START_RABBIT=
26 [ "x" = "x$RABBITMQ_ALLOW_INPUT" ] && RABBITMQ_START_RABBIT=" -noinput"
27 [ "x" = "x$RABBITMQ_NODE_ONLY" ] && RABBITMQ_START_RABBIT="$RABBITMQ_START_RABBIT -s $RABBITMQ_BOOT_MODULE boot "
28
line 49:
46 if ! mkdir -p "$RABBITMQ_PID_DIR"; then
47 # Better diagnostics - 'mkdir -p' reports only the first directory in chain that
48 # it fails to create
49 echo "Failed to create directory: $RABBITMQ_PID_DIR"
50 exit $EX_CANTCREAT
51 fi