The rebuilding command

ikiwiki --setup mysite.setup --rebuild

issues an error

multimarkdown is enabled, but Text::MultiMarkdown is not installed

I then tried to install it on macOS using

brew install multimarkdown

and then

sudo pkgin -y install multimarkdown

and then rebuilding, but I still get the same error.

Why and how do I fix it?