Hi Alvin,
I don't think this is an issue with the packages that the RabbitMQ team provides. First of all, you're using a very old version of RabbitMQ (3.6.10) whereas the latest version is 3.7.15. Here's what I did:
I used the attached Vagrantfile to install Erlang and RabbitMQ on Ubuntu 18.
I then enabled the rabbitmq_management plugin via rabbitmq-plugins enable rabbitmq_management
Then, locate the rabbitmqadmin file that is deployed as part of the RabbitMQ package:
/var/lib/rabbitmq/mnesia/rabbit@UBUNTU-18-plugins-expand/rabbitmq_management-3.7.15/priv/www/cli/rabbitmqadmin
Then, get the version:
root@UBUNTU-18:~# python /var/lib/rabbitmq/mnesia/rabbit@UBUNTU-18-plugins-expand/rabbitmq_management-3.7.15/priv/www/cli/rabbitmqadmin --version
rabbitmqadmin 3.7.15
So, as you can see, when we build our packages, the prepare-dist target is called correctly. There must be some other issue.
Thanks -
Luke