How to install and use "node-red-contrib-mcp23017"

What operating system are you doing this on? Is it a "lite" version?

Could you try installing the following

sudo apt-get install build-essential

and then retry