1. You can try to install this dependency first, and then try to compile whether it can be compiled normally
apt-get --reinstall install libmpc3
2. If it still doesn’t work, you can check whether there is this file in your compilation package path, or whether there is this file in other paths. If so, open the file with VI and insert a line below your path
sudo vi /etc/ld.so.conf
For example, mine is/opt/usr/lib
and then refresh
sudo ldconfig