Are there any risks or disadvantages to building software from source, compared to installing a package? Can it mess with my system in any way?
I usually avoid it because I’ve found it to be a faff and often doesn’t work anyway but in a couple of cases it has been necessary.


Gentoo user…but assuming now it’s about building on distributions that don’t automate it like gentoo.
Disadvantages:
Of course you also gain a lot of advantages…but that wasn’t asked ;)
You can “escape” most of the mentioned disadvantages by using a distro like gentoo that automates much of this. It’s probably worth a look if you plan on doing this regularly.
edit:typos