/usr/lib/libmgd77.so is in libgmt-dev 4.5.12-1.
This file is owned by root:root, with mode 0o777.
It is a symlink to /usr/lib/libmgd77.so.4
/usr/lib/libmgd77.so.4