There are two common causes for such issues:
1. Command not executing:
If you're unable to run a command (e.g., nsqmigr), it may be because the bin directory is not included in your PATH environment variable. To resolve this, run the command with ./ from the current directory:
./nsqmigr
2. Shared library error:
If you see an error like:
./nsqmigr: error while loading shared libraries: libnsqapi.so: cannot open shared object file: No such file or directory
This means the LD_LIBRARY_PATH environment variable is either not set or does not include the apwmq/lib directory. You need to set it before running nsqmigr.
Example:
export LD_LIBRARY_PATH=/opt/nastel/apwmq/lib:$LD_LIBRARY_PATH